id = "sabnzbd" name = "SABnzbd" homepage = "https://sabnzbd.org" description = "The free and easy binary newsreader." # The app icon at the largest size sabnzbd.org publishes. icon = "https://sabnzbd.org/images/icons/android-192x192.png" executables = ["sabnzbd"] [dotfiles] # SABnzbd.py, get_user_profile_paths(), picks the data directory per platform # and SABnzbd.py then opens DEF_INI_FILE inside it # (`inifile = os.path.abspath(os.path.join(sabnzbd.DIR_LCLDATA, DEF_INI_FILE))`). # sabnzbd/constants.py sets DEF_INI_FILE = "sabnzbd.ini" and DEF_WORKDIR = # "sabnzbd", and the three branches are: # # Windows CSIDL_LOCAL_APPDATA joined with DEF_WORKDIR, i.e. # %LOCALAPPDATA%\sabnzbd (the except branch spells it out by # rewriting AppData\Roaming to AppData\Local) # macOS "%s/Library/Application Support/SABnzbd" % home # Unix "%s/.%s" % (home, DEF_WORKDIR), i.e. ~/.sabnzbd # # [dataHome] is ~/Library/Application Support on macOS and %LOCALAPPDATA% on # Windows, so it covers those two exactly; the name differs only in case between # them and both filesystems are case-insensitive. Linux lands somewhere else # entirely and is written out. On Linux [dataHome] resolves to # ~/.local/share/SABnzbd, which SABnzbd never creates, and a consumer skips a # path that is not on disk. paths = [ "~/.sabnzbd/sabnzbd.ini", "[dataHome]/SABnzbd/sabnzbd.ini", ] # The admin database, logs and .nzb backups live in directories named *by* # sabnzbd.ini rather than inside it, so there is nothing to carve out of the # file itself. exclude = [] # Not a whole-file secret: the newsreader is configured almost entirely in this # file — categories, sorting, scheduling, post-processing — and only the # credential lines are lifted out below. secret = [] # sabnzbd/cfg.py declares each of these in the "misc" section: # api_key and nzb_key are generated by create_api_key() and are the tokens that # authenticate every API call; password and email_pwd are OptionPassword, the # web-interface login and the SMTP password. A `password` line also appears # under each [servers] section, which is the Usenet account password, and the # same prefix reaches it. [[dotfiles.secret_paths]] file = ["~/.sabnzbd/sabnzbd.ini", "[dataHome]/SABnzbd/sabnzbd.ini"] match = { prefix = ["api_key", "nzb_key", "password", "email_pwd"] } # Directories on this disk, each declared in sabnzbd/cfg.py as an OptionDir: # download_dir and complete_dir are where downloads land and end up, dirscan_dir # is the watched folder, script_dir holds the post-processing scripts and # nzb_backup_dir the kept .nzb files. All five are normally absolute and mean # nothing on another machine. # # host, port and https_port are deliberately absent even though the web # interface's bind address is machine-local: a prefix matches a line, not a # section, and the same three keys appear again under each [servers] block, # where they are the Usenet provider's address and are exactly what a user wants # carried over. [[dotfiles.machine_lines]] file = ["~/.sabnzbd/sabnzbd.ini", "[dataHome]/SABnzbd/sabnzbd.ini"] scope = "backup" match = { prefix = [ "download_dir", "complete_dir", "dirscan_dir", "script_dir", "nzb_backup_dir", ] }