jmbannon / ytdl-sub

Lightweight tool to automate downloading and metadata generation with yt-dlp
https://ytdl-sub.readthedocs.io
GNU General Public License v3.0
1.58k stars 60 forks source link

Add %regex_sub built-in script function #971

Closed tbabej closed 2 months ago

tbabej commented 2 months ago

This implements %regex_sub built-in function to enhance string-processing capabilities, allowing users to perform substitutes like:

Also added a couple of tests to cover the added functionality.

jmbannon commented 2 months ago

Thanks for this @tbabej ! Can you merge with latest master, and run make docs. That will update the readthedocs rst

tbabej commented 2 months ago

My apologies for missing that requirement, docs regenerated in 8abaace. The PR is also now rebased on top of latest master as requested.

jmbannon commented 2 months ago

@tbabej All good! It's not documented anywhere and I only added it to the Makefile earlier today. PR should be good to merge, thanks again

jmbannon commented 2 months ago

Ah, can you run make lint as well

tbabej commented 2 months ago

Ah, I use black with a custom line length limit :sweat_smile: re-ran with make lint and squashed into relevant commit, should be all fixed now :slightly_smiling_face: