Config Syntax?

Which is the proper/preferred syntax for config.yaml?

copy: yes / no
copy: true / false

In the docs for ‘replace’, it says

replace:
    '[\\/]': _
    '^\.': _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '\.$': _
    '\s+$': ''
    '^\s+': ''
    '^-': _

Is this the default behavior if there is no reference to ‘replace’ in config.yaml?

Either one is fine. Since this is YAML, you can answer questions like this by looking at the YAML documentation:
http://yaml.org/type/bool.html

And yes, those are the defaults for replace. Could the docs somehow make that clearer for you?

Thanks for the reference …

As for the docs, they’re well formatted, it’s just the partial ambiguity in seeing various examples written differently.

What was a major stumbling block for me was there being no sample config. While I gather you probably are not wanting to scare off people from the start, that config file that is buried in the source tree could probably be included in the pkg, pre-placed at .config/beets/etc as config.yaml.sample. and noted that these are the default options in syntax form, use this file to start your own config when you’re ready.

Thanks for Beets! This is most excellent. :slight_smile:

Gotcha. One reason I’ve resisted adding a prominent example config has been that I believe beets is usable without configuring anything. It has a ludicrous number of configuration options, and I like to emphasize that you don’t need to worry about 99% of them until you need them. Including a replace configuration—even the default options—would probably be too detailed, for example: I think most people should leave that option alone until they discover they need to change it.

One example config I do like is the one in the “getting started” guide:
http://docs.beets.io/en/v1.4.6/guides/main.html#configuring

which is only two lines:

directory: ~/music
library: ~/data/musiclibrary.db

We could probably shorten that to one line. :slight_smile:

While it’s usable without doing anything, my attraction was specifically some of the enabled options and plugins, which is where that properly formatted config file would have been what I’d be looking for.

Making me resort to looking abroad for other examples and then finding some with this syntax, some with that, some boolean, some textual, some have delimited lines, others all on one…

If your configuration file is documented in such a way that “Here it is for when you’re ready to advance” … (or for those who are starting out that way and want to get right to it) that would go a lot further IMHO :wink:

I hadn’t had much exposure to YAML until coming upon Beets and now that I’ve read more of that, I can certainly see why it was chosen for the configuration. If Samba and Netatalk were as nice to configure…

All good points! Got any examples for what such an example might look like? :slight_smile: