id = "goldendict" name = "GoldenDict" homepage = "http://www.goldendict.org" description = "The project aims to create a feature-rich dictionary lookup program." # The GoldenDict application icon, from the project's repository. icon = "https://raw.githubusercontent.com/goldendict/goldendict/master/redist/icons/goldendict.png" executables = ["goldendict"] [dotfiles] # config.cc, getHomeDir(): # Windows ~/Application Data/GoldenDict if it exists, else %APPDATA%/GoldenDict # elsewhere ~/.goldendict, except that a build with # XDG_BASE_DIRECTORY_COMPLIANCE — "#if defined(HAVE_X11) && QT_VERSION >= 5", # so Linux/X11 only, never macOS — falls back to # QStandardPaths::ConfigLocation + "/goldendict" when ~/.goldendict is absent # # So ~/.goldendict is the location on macOS and on any machine that had # GoldenDict before the XDG change, [configHome]/goldendict is where a fresh # Linux install goes, and %APPDATA%/GoldenDict is Windows. [configHome] rather # than a literal ~/.config because the code goes through ConfigLocation, which # is $XDG_CONFIG_HOME; its macOS half resolves to a directory GoldenDict never # opens, and there is simply no file there. # # What the directory holds, all named in config.cc: "config" (the main XML, # line 2234), "favorites" (2286), "article-style.css" (2291), # "article-style-print.css" (2296), "qt-style.css" (2301) and "styles" (2387). # # The active fork, GoldenDict-ng (https://github.com/xiaoyifang/goldendict-ng), # keeps the same names and widens the XDG branch to every Unix except macOS. paths = [ "~/.goldendict/", "[configHome]/goldendict/", "%APPDATA%/GoldenDict/", ] # index/ is the dictionary index, built from the user's dictionary files and # large enough to be the bulk of the directory (config.cc line 2249 creates it # under the home dir; an XDG build moves it to the cache directory unless a # legacy one is already there). pid is a lock file, history is the lookup log — # state either way, and on an XDG build history relocates to the data directory # too. Each carve-out is repeated under every spelling above, or it would not # run on the platforms it is missing from. exclude = [ "~/.goldendict/index/", "[configHome]/goldendict/index/", "%APPDATA%/GoldenDict/index/", "~/.goldendict/pid", "[configHome]/goldendict/pid", "%APPDATA%/GoldenDict/pid", "~/.goldendict/history", "[configHome]/goldendict/history", "%APPDATA%/GoldenDict/history", ] # No whole-file credential: `config` is dictionary paths, hotkeys, groups and # appearance, and the rest is CSS. Be aware that `config` can carry one # credential *inside* it — config.cc lines 940-941 read # and back out of it, and lines # 1902-1906 write them — but it is XML, and this schema's `format` covers toml, # yaml and json only, so no secret_paths rule can reach it. A consumer that # content-scans what it syncs is the layer that catches that one. secret = [] # No machine_lines, for the same reason: the file is XML. The machine-local # part of it is real and worth knowing — every entry names an # absolute path to a dictionary file on this machine — so a consumer able to # read GoldenDict's XML should expect to rewrite those.