|
UniNews
University news from Greek and international universities in one place
|
Functions | |
| Path | xdg_dir (str variable, str default) |
| dict | load_settings () |
| None | save_settings (dict settings) |
| str | load_unios_university () |
| str | home_university (dict settings) |
| int | refresh_interval_ms (dict settings) |
Variables | |
| str | APP_NAME = "uninews" |
| PACKAGE_DIR = Path(__file__).resolve().parent | |
| str | PUBLISHERS_DIR = PACKAGE_DIR / "resources" / "publishers" |
| str | ICON_FILE = PACKAGE_DIR / "resources" / "icons" / "uninews.png" |
| Path | CONFIG_DIR = xdg_dir("XDG_CONFIG_HOME", ".config") |
| Path | DATA_DIR = xdg_dir("XDG_DATA_HOME", ".local/share") |
| Path | CACHE_DIR = xdg_dir("XDG_CACHE_HOME", ".cache") |
| Path | SETTINGS_FILE = CONFIG_DIR / "settings.json" |
| Path | DATABASE_FILE = DATA_DIR / "uninews.db" |
| str | ACADEMIC_CONFIG_FILE = Path.home() / ".unios" / "academicConfig.json" |
| dict | DEFAULT_SETTINGS |
| str | HOME_UNIVERSITY_ALL = "all" |
| int | MIN_REFRESH_INTERVAL_MINUTES = 15 |
Where files live, and the user's preferences. User data follows the XDG spec, so an installed copy never writes next to its own code: ~/.config/uninews/settings.json and ~/.local/share/uninews/uninews.db
| str uninews.config.home_university | ( | dict | settings | ) |
Publisher to open with, or "" for All sources. Order: the UniNews setting, then the UniOS profile from UniDesk, then All sources.
| dict uninews.config.load_settings | ( | ) |
Defaults, with whatever the user has saved on top.
| str uninews.config.load_unios_university | ( | ) |
The university picked in UniDesk, or "" when none is set or the file is unreadable.
| int uninews.config.refresh_interval_ms | ( | dict | settings | ) |
Auto-refresh interval in milliseconds, or 0 when it is off.
| None uninews.config.save_settings | ( | dict | settings | ) |
Write atomically, so a crash mid-save can't corrupt the file.
| Path uninews.config.xdg_dir | ( | str | variable, |
| str | default | ||
| ) |
| str uninews.config.ACADEMIC_CONFIG_FILE = Path.home() / ".unios" / "academicConfig.json" |
| str uninews.config.APP_NAME = "uninews" |
| Path uninews.config.CACHE_DIR = xdg_dir("XDG_CACHE_HOME", ".cache") |
| Path uninews.config.CONFIG_DIR = xdg_dir("XDG_CONFIG_HOME", ".config") |
| Path uninews.config.DATA_DIR = xdg_dir("XDG_DATA_HOME", ".local/share") |
| Path uninews.config.DATABASE_FILE = DATA_DIR / "uninews.db" |
| dict uninews.config.DEFAULT_SETTINGS |
| str uninews.config.HOME_UNIVERSITY_ALL = "all" |
| str uninews.config.ICON_FILE = PACKAGE_DIR / "resources" / "icons" / "uninews.png" |
| int uninews.config.MIN_REFRESH_INTERVAL_MINUTES = 15 |
| uninews.config.PACKAGE_DIR = Path(__file__).resolve().parent |
| str uninews.config.PUBLISHERS_DIR = PACKAGE_DIR / "resources" / "publishers" |
| Path uninews.config.SETTINGS_FILE = CONFIG_DIR / "settings.json" |