![]() |
#1 |
Member
![]() Posts: 13
Karma: 10
Join Date: Apr 2016
Device: none
|
Tag Mapper 'Contains' Issue
I thought I had tag mapper working when I tested out the rules about 2 releases ago but when I tested again, I noticed that the 'contains' for tag mapper no longer works.
for my first rule, I have replace the tag if it 'contains' : 100, lexa with the tag : Lexa (The 100), The 100 (TV) when I went to test the rule with '100, lexa' in tag mapper, I get '100, lexa' when I try with just one tag and replace with another tag, it still doesn't work. can anyone else confirm if this is happening to them or have any insights? Edit: Currently running 2.61, Windows 7 Thanks, Blake Last edited by blake98; 07-03-2016 at 10:47 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,246
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cannot use commas in rules. commas are what separate tags, therefore tags will never contain commas and rules contianing commas wll never match anything
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 13
Karma: 10
Join Date: Apr 2016
Device: none
|
I thought with the comma, you can use multiple tags when using contain?
so if I use contain, I can say if contain tag1, tag2, replace with text1, tag2? or it doesn't work that way? if not, is the only other solution to write a form of regex for this and use pattern matching? |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,246
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
tag rules apply to single tags, regardless of whether they are contains/regexes/whatever. You cannot make a rule that discards one tag based on whether other tags are present.
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 13
Karma: 10
Join Date: Apr 2016
Device: none
|
ah, ok thank you for clarifying
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 13
Karma: 10
Join Date: Apr 2016
Device: none
|
Based on how contains works, if I do:
replace the tag if it contains the tag: 'Lexa' with the tag 'Lexa (The 100)' my result is still 'Lexa' Should that work? or I'm missing something? This is when I use the test rules button. Do you have any insights for this? Last edited by blake98; 07-03-2016 at 03:21 PM. |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,246
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That is indeed a bug in contains matching. Use lowercase for the contains query and it will work. i.e. use lexa instead of Lexa
https://github.com/kovidgoyal/calibr...33f331a4d91471 Last edited by kovidgoyal; 07-03-2016 at 11:58 PM. |
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 13
Karma: 10
Join Date: Apr 2016
Device: none
|
thanks kovidgoyal!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
About Tag Mapper | mariaclaudia | Calibre | 5 | 07-05-2016 09:46 AM |
How to use tag mapper on existing and new books?? | blake98 | Library Management | 5 | 04-25-2016 03:49 PM |
Tag Mapper: Regular Expressions, need help | BookFest | Calibre | 2 | 04-17-2016 09:47 AM |
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 |