Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-18-2022, 08:40 PM   #1
gsd2012
Member
gsd2012 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Sep 2015
Device: nonne
Bulk Rename Tags



I know this maybe a topic that has come up a few times but I could not find a direct answer. Is there a way to bulk rename tags in Calibre? Maybe log that contains them all? A tool I am not familiar with? I did set a rule to Capitalize the tags but what if you have a bunch that are all lower case titles and want them to be upper case titles? Do I have to use the Tag editor to do each one? I have started to remove all the junk ones but I have thousands that are not done right in terms of title cases. Any help would be great.

gsd2012 is offline   Reply With Quote
Old 03-18-2022, 08:44 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,340
Karma: 6700866
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
If you right click on "Tags" in the left column, there is a Tag Manager. Maybe that will help?
Karellen is offline   Reply With Quote
Advert
Old 03-18-2022, 09:02 PM   #3
gsd2012
Member
gsd2012 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Sep 2015
Device: nonne
Quote:
Originally Posted by Karellen View Post
If you right click on "Tags" in the left column, there is a Tag Manager. Maybe that will help?
I have been using that but you have to do each one, one at at time. I wanted to know if you can bulk rename them? Seems like that would be a nice feature to correct all tags into Title format what all the first letters of each word being in caps. It would be nice to highlight them all and then say set to all works capitalized like a title. Some are all lower case, some are all upper case, and some are half and half.
gsd2012 is offline   Reply With Quote
Old 03-18-2022, 09:03 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,964
Karma: 27620690
Join Date: Mar 2012
Location: Sydney Australia
Device: none
↑ ↑ ↑ ✔

I'd use the Tag Manager get rid of the rubbish tags by deletion

I would then do a library backup, and then use a regular expression in Bulk Edit Search and Replace to change lower case tags to Title case.

BR
BetterRed is offline   Reply With Quote
Old 03-18-2022, 09:21 PM   #5
gsd2012
Member
gsd2012 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Sep 2015
Device: nonne
Quote:
Originally Posted by BetterRed View Post
↑ ↑ ↑ ✔

I'd use the Tag Manager get rid of the rubbish tags by deletion

I would then do a library backup, and then use a regular expression in Bulk Edit Search and Replace to change lower case tags to Title case.

BR
Ok not that good with reg exp so how would you do that? What would the expression look like?

gsd2012 is offline   Reply With Quote
Advert
Old 03-18-2022, 09:30 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,964
Karma: 27620690
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by gsd2012 View Post
Ok not that good with reg exp ...
Nor me, I always have to work 'em out by hit and miss - hopefully one of the re-wizards will come along soon.

BR
BetterRed is offline   Reply With Quote
Old 03-18-2022, 09:55 PM   #7
gsd2012
Member
gsd2012 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Sep 2015
Device: nonne
Quote:
Originally Posted by BetterRed View Post
Nor me, I always have to work 'em out by hit and miss - hopefully one of the re-wizards will come along soon.

BR

Same here... more misses than hits.
gsd2012 is offline   Reply With Quote
Old 03-21-2022, 05:00 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,964
Karma: 27620690
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Bump - gsd2012 needs Regex help - Case change tags in bulk edit

BR
BetterRed is offline   Reply With Quote
Old 03-21-2022, 05:31 PM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,978
Karma: 7257321
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Bump - gsd2012 needs Regex help - Case change tags in bulk edit

BR
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 matching 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.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	81
Size:	143.5 KB
ID:	192883  

Last edited by chaley; 03-26-2022 at 03:30 PM.
chaley is offline   Reply With Quote
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
Old 09-27-2024, 11:58 AM   #11
luciaisacat
Enthusiast
luciaisacat began at the beginning.
 
luciaisacat's Avatar
 
Posts: 39
Karma: 10
Join Date: May 2012
Device: android
I'm using this thread for a slighltly different request (I hope it's OK).

I wish to rename many different tags (>1000), in one hyerarchical category, by adding an additional word to them.

E.g. Rename tags " Prize.[name of the prize].[year of the prize] " to " Prize.[name of the prize].[year of the prize].Winner " (and similarly rename tags " Lists.[name of the prize].[year of the prize] " to " Prize.[name of the prize].[year of the prize].Shortlist ")

What would be the regex expression to use?

Thanks!
luciaisacat is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk title rename in Calibre? DMcCunney Library Management 6 12-09-2018 03:44 PM
Change Bulk Rename Prefix? MerlinMama Editor 8 11-21-2017 04:05 AM
Bulk Tag Rename Bokononist Library Management 3 04-10-2015 08:30 PM
Bulk fill title with same value (like bulk rename author)? rebl Library Management 1 08-22-2014 12:05 PM
Error when trying to bulk rename files cager Editor 2 04-09-2014 05:08 AM


All times are GMT -4. The time now is 07:45 AM.


MobileRead.com is a privately owned, operated and funded community.