View Single Post
Old 03-26-2022, 03:25 PM   #10
gsd2012
Member
gsd2012 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Sep 2015
Device: nonne
Ok I see what you mean there. I was just trying to make all the tags look the same. I wish there was a place like a log it puts them in and I can got and just correct them all from a txt editor and get rid of all the junk stuff. Thank you for all the help.



Quote:
Originally Posted by chaley View Post
If I wanted to do this then I would change all tags to title case. Any words in tags that are all in lower case would be changed. Words in tags that aren't, for example have embedded uppercase letters, wouldn't be touched. E.g.,
Code:
aAAa ::: Aaaa bbb ::: aaaaa ::: bBbb bbb => aAAa ::: Aaaa Bbb ::: Aaaaa ::: bBbb Bbb
Rules more complicated than that requires human intervention

A nuclear option is to change all tags to lower case, then in a second run change all tags to title case, then in a third pass fix the ones now broken. It is hard to imagine that this is a good idea, but heh, what do I know?

In general, regular expressions in calibre have trouble dealing with matrching case because calibre tries very hard to ignore it. Search & replace can deal with case but it is hard to handle words like VoIP that are intentionally mixed-case. The difficulty is increased by the rule complexity: calibre's titlecase() function tries very hard to handle (English) punctuation and acronyms.

Last edited by gsd2012; 03-26-2022 at 03:32 PM.
gsd2012 is offline   Reply With Quote