podcast-dl
podcast-dl copied to clipboard
Enhancing template options
Curious if among past comments here anyone has asked about some of these options for templating:
- Strip spaces
- Strip special characters
- Replace spaces with underscores
- Replace " - " or ": " with underscores
- Convert to UpperCamelCase
e.g. "Serial- S01 E01: The Alibi" --> "Serial_S01E01_TheAlibi"
Don't want to expand the scope too far beyond what maintainer is interested in, so seeing if there's interest here.
How do you expect these options to be specified?
For example: -B (Strip spaces), -S (Strip special chars), -BU (Replace blank with underscore), -JU (Replace joining chars of - and : by underscore) AND finally -Camel?
Thoughts, suggestions?
Locally, I implemented --alphanumeric and --upperCamelCase flags, and applied them to both the title and podcastTitle fields whenever they were set.
More flexible would be to include the options as flags within the templating, e.g.
- Current:
--episode-template "{{podcast_title}} - {{title}}" - Updated:
--episode-template "{{podcast_title -C -S -B}} - {{title -J}}
But in my opinion, specifying the string manipulation on a per-field basis like the above is overkill. Really it's just the title and podcastTitle fields that would be affected.
Now that this has marinated a bit, what are your thoughts? @lightpohl
It would spare me (maybe others) from passing the downloaded files through a file-renamer after downloading, but if it's beyond your intended scope, feel free to close the issue.
How others are archiving the six-bajillion podcasts out there, idk, but this has saved me dozens of hours. ty.