geigerzaehler / beets-alternatives

Beets plugin to manage external files
MIT License
93 stars 21 forks source link

Support replacements on alternates #14

Closed mathstuf closed 5 years ago

mathstuf commented 6 years ago

This can be used to support making an alternate for placing on a restricted filesystem (such as FAT) while leaving the main library intact. Basically, this is a request to support the top-level replace configuration in an alternate.

geigerzaehler commented 5 years ago

Hi @mathstuf, I don’t quite understand what you mean by “support replacements” and what the replace command should do. Can you maybe give an example?

mathstuf commented 5 years ago

It's the same as the top-level replace configuration. It should support rewriting characters in filenames (e.g., to make them vfat-safe). I don't want my main library to have it, but the alternatives for USB keys or phones should do such replacements.

geigerzaehler commented 5 years ago

Now I understand, Thanks for the clarification. I’m not actively maintaining this project, so it is unlikely that I’m going to work on it. If anybody is up to adding this feature, I’d gladly support them.

daviddavo commented 5 years ago

You can use %asciify{text}

https://beets.readthedocs.io/en/stable/reference/pathformat.html

kergoth commented 5 years ago

You can use %asciify{text}

https://beets.readthedocs.io/en/stable/reference/pathformat.html

It's a good point, you can use a custom path format function in a plugin to apply more specific replacements instead of or in addition to an asciify as well.

kergoth commented 5 years ago

You can use %asciify{text} https://beets.readthedocs.io/en/stable/reference/pathformat.html

It's a good point, you can use a custom path format function in a plugin to apply more specific replacements instead of or in addition to an asciify as well.

https://github.com/kergoth/Beets-Library/blob/master/Beets/plugins/replace_format.py

geigerzaehler commented 5 years ago

Thanks for the nice solution @daviddavo and @kergoth.