Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-19-2025, 12:59 PM   #1
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 301
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
tag mapper: if [tag] is present, add [other tag]

Is there any way, using the Tag Mapper, to automatically add a tag if another tag is present?

For example, if a book has the High-Tech & Military Sci-Fi tag, I would like the Tag Mapper to add the Science Fiction tag for me, without removing the High-Tech & Military Sci-Fi tag.
isarl is offline   Reply With Quote
Old 11-19-2025, 03:32 PM   #2
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 301
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
I asked my initial question because I assumed that there would be a relevant verb in the drop-down list of verbs in the Tag Mapper (Remove, Replace, Keep, etc.) that could do what I wanted. But I have figured out how to do what I want in the absence of such a verb!

I noticed that:

Quote:
The rules will be processed in order […] until either a "remove" or "keep" rule matches.
So I did some testing, and the below seems to work. Given some tag “extra” which I want to add when another tag “trigger” is present:

1. Replace the tag, if it is one of: trigger with the tag: trigger & extra

2. Split the tag, if it is one of: trigger & extra on the character: &

Now the trigger and extra tags will continue to be processed by any subsequent rules. Or if you wish, you can add Keep rules for either or both of them at this point, to prevent further processing of these tags.

Thank you for reading – hope this helps somebody!
isarl is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion for tag mapper Rellwood Calibre 1 02-14-2022 04:43 AM
Tag Mapper: Remove tag if another specific tag exists? ownedbycats Library Management 2 07-23-2020 11:32 PM
About Tag Mapper mariaclaudia Calibre 5 07-05-2016 10:46 AM
Help: Tag Mapper and RegExpressions jecilop Library Management 17 04-14-2016 11:41 PM
Export Library, Tag Mapper, Add From ISBN edeniz Library Management 7 11-09-2015 08:41 AM


All times are GMT -4. The time now is 09:48 AM.


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