lightpohl / podcast-dl

A humble CLI for downloading and archiving podcasts.
MIT License
378 stars 27 forks source link

Add `episode_year` template option for `--episode-template` #81

Closed lightpohl closed 3 weeks ago

lightpohl commented 3 weeks ago

Pulled from https://github.com/lightpohl/podcast-dl/issues/78

Add episode_year template option so users can organize their podcasts by year.

minnas23 commented 3 weeks ago

Hello. Thank you for adding episode_year template option for --episode-template.

I think, after adding release_year to --episode-template, release_month and release_day should also be added to --episode-template with option to padding zero to date and month like --episode-digits.

For example with this option user can select 08-9-2023, 8-09-2023, 08-09-2023 --episode-template "{{title}} ({{release_month}}-{{release_day}}-{{release_year}})"

i think you should remove release_date from --episode-template and replace the default template from

--episode-template "{{release_date}}-{{title}}"

to --episode-template "{{release_year}}{{release_month}}{{release_day}}-{{title}}"

With the change from release_date to release_year, release_month and release_day, user can customize more, such as date format like DDMMYYYY, MMDDYYYY like this

--episode-template "{{release_month}}{{release_day}}{{release_year}}-{{title}}" --episode-template "{{release_day}}{{release_month}}{{release_year}}-{{title}}"

and can use like this

--episode-template "{{title}} ({{release_year}}{{release_month}}{{release_day}})" --episode-template "{{title}} ({{release_month}}-{{release_day}}-{{release_year}})" --episode-template "{{title}} ({{release_day}}-{{release_month}}-{{release_year}})"

and user can organize their podcasts by year and month like this.

& ".\podcast-dl-10.1.0-win-x64.exe" --url https://feeds.buzzsprout.com/100.rss --episode-num-offset 2 --out-dir ".\{{podcast_title}}" --episode-template "{{release_year}}\{{release_month}}\{{episode_num}}. {{title}}" --archive ".\resources\Buzzsprout_Podcast\archive.json" --episode-digits 3 --reverse

beside this

& ".\podcast-dl-10.1.0-win-x64.exe" --url https://feeds.buzzsprout.com/100.rss --episode-num-offset 2 --out-dir ".\{{podcast_title}}" --episode-template "{{release_year}}\{{episode_num}}. {{title}}" --archive ".\resources\Buzzsprout_Podcast\archive.json" --episode-digits 3 --reverse

With this change, users will have more options to customize the date format in --episode-template instead of just being able to choose the YYYYMMDD format as currently with release_date in --episode-template and have more way to organize podcasts with date, month and year in --episode-template

lightpohl commented 3 weeks ago

Going to leave the default the same to avoid a breaking change, but I added release_month and release_day to the latest release!