![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2016
Device: Kindle, iPad
|
Tag Mapper: Regular Expressions, need help
Hi all,
I apologize in advance for this being one of my first post. I've looked throughout (and Googled in case there was an answer elsewhere) to no avail. Context: Calibre has been a Godsend with all the various PDF and other books I've collected along the way. I'm now in the process of tagging and organizing my library. I get most of my tags from Goodreads because they work best for me. I also take ample advantage of the fact that so much can be automated in the program. I'm attempting to do simplify my tagging. In other words, eliminate tags little by little until there is only one per book. Problem: What I would like is that if there are several tags, and one specific tag is present, it replaces all of them. Automatically. For example: Original: Horror, Science Fiction, Zombies Result: Horror Regardless of where Horror is in the list, it always primes. I've tried: (settings: Replace, Matches pattern) .*(Horror).* \1 Also: (.*?)(Horror)(.*?) \2 This may seem like a truly dumb request for help to some of you, and I truly looked through both the Calibre help page on Regular Expression and the Python one. But I can't seem to figure that one out. If any of you could help, it would be truly appreciated. I've spent 2 days trying to figure it out and I'm at my wits end. Thank you! Last edited by BookFest; 04-16-2016 at 10:47 PM. Reason: Politeness |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no way to do this via the Tag Mapper. The tag mapper operates only on one tag at a time. Instead you can do this by simply searching for the tag horror
tags:=Horror and then using the bulk metadata edit dialog to remove all tags and then add back the Horror tag. However, this process is manual and wont happen automatically for newly added books. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2016
Device: Kindle, iPad
|
Thank you for the answer! I'll have to take the time to bring it down to as few tags as possible (by eliminating synonyms and similar genres) and do it manually.
Thanks for Calibre too ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help: Tag Mapper and RegExpressions | jecilop | Library Management | 17 | 04-14-2016 10:41 PM |
Bug in Tag Mapper | elricks | Calibre | 1 | 01-09-2016 04:04 AM |
Export Library, Tag Mapper, Add From ISBN | edeniz | Library Management | 7 | 11-09-2015 07:41 AM |
Need help with regular expressions | davy39 | Library Management | 0 | 10-16-2015 04:11 AM |
Help with regular expressions | MostlyCarbon | Library Management | 0 | 02-04-2012 03:00 PM |