Open xmixahlx opened 6 years ago
+1-- I'm unsure of whether we should just ship with this sitting in /usr/share/ ... or actually create it in the user's $HOME on first run, but we should ship a valid and complete config file.
I think both is preferable. Shipping in /usr/share and copying to $HOME upon first run. You'll edit in $HOME and won't have to dig further for documentation. You also have a reference default config in /usr/share should things go south.
Thinking about it a bit more, I think there's some complications with writing on the first run. How do we detect this is the first time the user's run whipper? I think a message on the help screen and documentation/README pointing to the default config in /usr/share/whipper/whipper.conf should be sufficient. Won't require adding any more software to the mix, and I think this is the approach taken by a lot of existing packages.
I also have a personal distaste for writing to a user's config directory without explicit permission. This is distinct from directory creation.
It seems counterintuitive to have a user invoke whipper with certain command line arguments, and then simultaneously write a config file with conflicting options. This would invite feature creep, I think.
so tl;dr: +1 to /usr/share/whipper/whipper.conf
Most applicable settings will be pulled from the user config, i.e. drive, cache, offset, directory, file name, etc. so the home config is necessary. Superseding the /usr/share config or ignoring the /usr/share config seem like the applicable questions.
Or are you against configuring these in the home config entirely?
I'm only against writing a default config "on first run" (whatever that means) to $HOME. If a config in $HOME exists, it will be read and used by whipper.
The /usr/share config will never be read programmatically by whipper (the place for that would be /etc).
What about a flag to initialise the configuration with default values? Or I can just finally finish that manpage... :)
See #73
I'd like to add that I had no idea what the track template variables were until I found this thread. The README also mentions "Unknown = True" as an example, but I don't know what tthat prepresents either.
Is there additional documentation regarding configuration that I might have missed? I tried "man whipper" but it doesn't seem to exist.
You can get the documentation for the rip options by typing 'whipper cd rip --help', and likewise for any other command. The command line options can be used in the config file. It's not super obvious, but it's there.
It has also often annoyed me that whipper destructively modifies the config file for some commands (e.g. whipper drive analyze
), removing all comments and whitespace. I normally use comments in config files to document options and was really annoyed to find out all my annotations had been deleted after running analyze on a new drive.
As part of this, I would like the whipper functions that modify the config file either to be made to preserve comments, or to not modify the config file at all (assuming it already exists), and instead instruct the user to add the appropriate configuration lines to it.
You can get the documentation for the rip options by typing 'whipper cd rip --help', and likewise for any other command. The command line options can be used in the config file. It's not super obvious, but it's there.
It's worse than "not super obvious". I've just spent 10 to 15 minutes to unsuccessfully find a way to avoid this error by setting the drive_auto_close
to False
in the config file, and couldn't figure out in which section to put it (I tried [whipper.cd]
, [whipper.cd.rip]
, [whipper.offset]
, [main]
and the drive-specific section without success).
@hadess
You missed one section:
[whipper]
eject = never
drive_auto_close = false
To ease configuration, a complete whipper.conf file with all default options could be created at first run (i.e. when ~/.config/whippper/whipper.conf is not detected). Doing so will allow easy access to change options without digging through documentation.
Recommend stating the possible variables in a comment block, i.e. artist, album, track, etc. and a simple "HOWTO".
Also recommend extending the information if running whipper cd rip without any stated or configured offset (i.e. "first time run"): Recommend output of the simple howto block here, or just the entire default configuration file to prompt configuration, i.e. "It looks like you haven't configured whipper yet..."
(The track and disc templates here are useful for most releases, including various artist/compilation type discs.)
Something like: