![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 43434
Join Date: Apr 2010
Device: Moon+ Reader (ePub)
|
Is there a way to merge tags, preferably via regex?
I've started keeping info on awards in tags and initially was keeping the year and category in separate tags but now I've decided I'd rather keep one tag.
Here's an example of the tags I have: Code:
Hugo2015, HugoNovel Code:
Hugo-2015-Novel Is there a simple-ish solution? PS. I know about custom columns but don't wish to use them. PPS. If there's a simple way to merge tags so I'd end up with "Hugo2015-HugoNovel" or even "Hugo2015HugoNovel" then that would be fine and I can regex from there. Last edited by Awfki; 10-30-2015 at 07:12 PM. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Understand that Tags that are separated (visually) by commas in the information panel or details are really separate (relational) Records in the linked books-Tags-lnk (table). at this location, they are index integers to the Tags (description) Table
You might be able to do some Native SQL stuff, but the risk is there ![]() ![]() show me Hugo Novels (any) Hugo Novels And Hugo<year> Hugo<year> (all types) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,339
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
@Awfki: Assuming you are using calibre's bulk metadata search and replace, use {template} as the search field, {tags} as the template, and tags as the destination field. You can then process all the tags as a single string.
|
![]() |
![]() |
![]() |
#4 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 344
Karma: 1222222
Join Date: Aug 2009
Location: Florida
Device: Sony PRS-505
|
I would just select all the books you want to change the tags on, then select edit metadata (for all the books). There is a selection "Add Tags" - put your new Tag (Hugo-2015-Novel) in the box. Then go to the selection "Remove Tags" and select the tags (Hugo2015, HugoNovel) you want to remove.
Try it on a few to see how it works for you. |
![]() |
![]() |
![]() |
#5 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 43434
Join Date: Apr 2010
Device: Moon+ Reader (ePub)
|
![]() Quote:
Now have I'll have to RTFM and figure out what else {template} is good for. Thanks |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 43434
Join Date: Apr 2010
Device: Moon+ Reader (ePub)
|
Quote:
That was the idea of those tags but each reputation of "Hugo" took a little more space in the tag column. I prefaced my Hugo-2015-Novel-Winner tag with zz t push it to the end and I can still do the various searches, I just have to break out the regex and any excuse to practice with those is a good one. |
|
![]() |
![]() |
![]() |
#7 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 43434
Join Date: Apr 2010
Device: Moon+ Reader (ePub)
|
Quote:
As is I've save an example search for next I need something like this. |
|
![]() |
![]() |
![]() |
#8 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
{Templates} are column lookup names {title} {#mycustomcol} The neat thing about {template} in S&R is you can use more than one at a time,. Whereas the other choice is limited to a single field(column) |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Q: Regex Find and Replace delete surrounding tags | hidden.platypus | Editor | 14 | 06-16-2015 11:16 PM |
RegEx to replace only inside certain tags? | phossler | Editor | 6 | 03-03-2015 08:24 PM |
Bulk metadata download and merge tags and select larger cover(s) | hiperlink | Calibre | 2 | 03-26-2014 03:58 AM |
Regex to selectively grab individual tags? | Sidetrack | Library Management | 1 | 05-02-2012 02:33 AM |
How to Merge Tags | Canna71 | Calibre | 5 | 09-26-2010 08:47 AM |