Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create whipper.conf with all default options #283

Open
xmixahlx opened this issue Jul 25, 2018 · 11 comments
Open

Create whipper.conf with all default options #283

xmixahlx opened this issue Jul 25, 2018 · 11 comments
Labels
Feature New feature Needed: discussion More discussion needed before anything can be done (or still no agreement has been reached) On Hold Waiting for other actions

Comments

@xmixahlx
Copy link

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:

# HOWTO setup your CD drive for whipper:
# - Select a common undamaged disc
# - Add CD drive details to the whipper config with: whipper drive analyze
# - Add  known drive offset value in whipper.conf (read_offset = #), or detect offset with: whipper offset find
# - Confirm desired configuration file options, including output directory and variables for disc and track naming.

# Track Template Variables only:
# - %t: track number
# - %a: track artist
# - %n: track title
# - %s: track sort name

# Shared Disc and Track Variables:
# - %A: album artist
# - %S: album sort name
# - %d: disc title
# - %y: release year
# - %r: release type, lowercase
# - %R: Release type, normal case
# - %x: audio extension, lowercase
# - %X: audio extension, uppercase

[main]
path_filter_fat = False
path_filter_special = False

[musicbrainz]
server = musicbrainz.org:80

[whipper.cd.rip]
prompt = False
unknown = False
cdr = False
logger = whipper
force_overread = False
output_directory = ~/
working_directory = ~/
track_template = %%A/%%d/%%t - %%a - %%n
disc_template = %%A/%%d/%%A - %%d
@RecursiveForest
Copy link
Contributor

+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.

@xmixahlx
Copy link
Author

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.

@RecursiveForest
Copy link
Contributor

RecursiveForest commented Jul 26, 2018

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

@xmixahlx
Copy link
Author

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?

@RecursiveForest
Copy link
Contributor

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).

@MerlijnWajer
Copy link
Collaborator

What about a flag to initialise the configuration with default values? Or I can just finally finish that manpage... :)

@MerlijnWajer
Copy link
Collaborator

See #73

@JoeLametta JoeLametta added Feature New feature On Hold Waiting for other actions Needed: discussion More discussion needed before anything can be done (or still no agreement has been reached) labels Nov 12, 2018
@darylf
Copy link

darylf commented Sep 19, 2021

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.

@brulzki
Copy link

brulzki commented Oct 11, 2021

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.

@eharris
Copy link

eharris commented Sep 14, 2022

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.

@hadess
Copy link

hadess commented Apr 26, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature Needed: discussion More discussion needed before anything can be done (or still no agreement has been reached) On Hold Waiting for other actions
Projects
None yet
Development

No branches or pull requests

8 participants