id = "mps-youtube" name = "mps-youtube" homepage = "https://github.com/mps-youtube/yewtube" description = "a Terminal based YouTube player and downloader. No Youtube API key required." # mps-youtube's own binary was `mpsyt`; the project continues in the same # repository under the name yewtube, whose setup.py declares # `entry_points={'console_scripts': ['yt = mps_youtube:main.main']}`. Both are # listed, because either one on a machine means this configuration directory. executables = ["mpsyt", "yt"] [dotfiles] # mps_youtube/paths.py, get_config_dir(): # # if mswin: confdir = os.environ["APPDATA"] # elif 'XDG_CONFIG_HOME' in environ: confdir = os.environ['XDG_CONFIG_HOME'] # else: confdir = ~/.config # mps_confdir = os.path.join(confdir, "mps-youtube") # # — the user config directory under all three platform names, which is what # [configHome] stands for, with the directory still called mps-youtube after # the rename. The README shows the same thing from the running program: its # status line prints `Config dir : /home/user/.config/mps-youtube`. # # mps_youtube/g.py names the files inside it: CFFILE is config.json (OLD_CFFILE # is the pre-JSON `config`), TCFILE is transcode, PLFILE is playlist_v2 with # OLD_PLFILE `playlist`, and PLFOLDER is playlists/. paths = [ "[configHome]/mps-youtube/config.json", "[configHome]/mps-youtube/config", "[configHome]/mps-youtube/transcode", "[configHome]/mps-youtube/playlist_v2", "[configHome]/mps-youtube/playlists/", ] # From the same block in g.py: HISTFILE is play_history.m3u (OLDHISTFILE # play_history) and CACHEFILE is cache_py_. Neither is under a # path listed above, so there is nothing to carve out of what is; they are # named so a consumer syncing the whole directory skips them. exclude = [ "[configHome]/mps-youtube/play_history.m3u", "[configHome]/mps-youtube/play_history", "[configHome]/mps-youtube/cache_py_*", ] # No API key: the README's own subtitle is "No Youtube API key required", and # nothing else in the config directory is a credential. secret = [] # Read at startup and rewritten by the `set` command; a running session holds # the parsed settings in memory. # `ddir` is the download directory — an absolute path this machine's disk, # derived in paths.py from $XDG_DOWNLOAD_DIR, ~/.config/user-dirs.dirs or # ~/Downloads. It is where the user's own files land, so it is kept for # rebuilding this machine and applied to no other. [[dotfiles.machine_lines]] file = "[configHome]/mps-youtube/config.json" match = { key_path = ["ddir"] } scope = "backup" # `mpv_bin`/`mplayer_bin` are absolute paths to the player executable, which is # /opt/homebrew/bin/mpv on one machine and /usr/bin/mpv on the next — that # location follows from the OS and the architecture, so it is shared across # machines of the same class instead of being pinned to this one. Two rules, # because the download directory beside them is not that kind of value. [[dotfiles.machine_lines]] file = "[configHome]/mps-youtube/config.json" match = { key_path = ["mpv_bin", "mplayer_bin"] } scope = "platform"