Done reading that tutorial but its hard for me to understand the code partes without a live example. My bad... so much to learn and I'm not a programmer!
Can someone paste me an example for replacing a : in title with - (for the save to disk template)
Then I can play with it and find some other uses (as in removing punctuation marks form file name)!
Update, giving a copy/paste ready example:
Using re(pattern, replacement)
(the details are in the quoted tutorial:
https://manual.calibre-ebook.com/template_lang.html )
Actual behaviour:
When a title field has a value with ":" (as in "Title: subtitle") the ":" would cause a filename with "_space" instead of the ":" as in the file name
Code:
Title_ subtitle.pdf
Instead... you can have a filename with "space-" as in "Title - subtitle".
For that use this in "Save to disk" Template (for the title field part)
I'm sure there could be better solutions as I'm a newbie and probably only useful for other newbies like me.
Related topics with same question
https://www.mobileread.com/forums/sh...d.php?t=263504
https://www.mobileread.com/forums/sh...d.php?t=169516