yyyyyyyan / bandcamper

Bandcamp downloader
MIT License
44 stars 9 forks source link

Add `_upper` modifier for customized file output #15

Closed Brisppy closed 9 months ago

Brisppy commented 9 months ago

This adds an uppercased variant to all track context variables allowing --output to be supplied with a variable such as {ext_upper}, where the output file would contain an upper-cased version of the requested variable.

e.g: {artist} - {album} ({year}) [{ext_upper}]) would output: Agoraphobic - IV (2023) [FLAC]

Brisppy commented 9 months ago

Implemented the changes using format_field as that seemed more appropriate as we aren't changing the variable type. Put the formatter into bandcamper/utils.py but if you want it somewhere else let me know.