Thread: Bulk Tag Rename
View Single Post
Old 04-10-2015, 02:39 AM   #1
Bokononist
Decadent Monarch
Bokononist began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2015
Location: Most people think it's the center of the universe. To me it seems tangential.
Device: Kindle Paperwhite (1st Version)
Bulk Tag Rename

I only recently discovered Calibre, and I have to say: it's brilliant. It has totally revolutionized not just my ebook collection, but the way I store and organize nearly every instance of the written word in my life. No matter how precise my demands, it seems to respond with a smart UI housing a powerful toolset.

Recently, though, I've been trying to consolidate various unnecessary custom columns into a smaller number of hierarchical columns, and it has proved difficult. Specifically, I need to copy tags from the various #editor, #illustrator (etc.) columns I've made, and write them to a "#credit" column with the name of the column it came from preserved as a hierarchical header. ie:

#editor(Slavoj Žižek, Mike Dulsa), #illustrator(Tom Skad) >>> #credit(Editor.Slavoj Žižek, Editor.Mike Dulsa, Illustrator.Tom Skad)

Thing is, though, and this may just be my very recent introduction to Regular Expressions hampering my vision, but I can't seem to find a way to do this. All columns are of the type "comma separated text, like tags, shown in the browser", although the various role columns are all checked as containing names and the #credit column is not. It's easy enough to use a wild card search and replace to get the tags into the #credit column, but manually editing each and every name tag via the tag browser to file them all into the hierarchy is no real option, and when I attempt to add the "Editor." to the "Replace" field in the search and replace dialog, I get a result like this:

Editor.SEditor.lEditor.aEditor.vEditor.oEditor.jEd itor.ŽEditor.iEditor.žEditor.eEditor.kEditor.Slavo jŽižek

Neither does the tag management window provide a solution... I can group tags into user groups, but this doesn't seem to grant any additional utility to modify the tags contained within the groups.

In the music management application I use, Foobar2000, there's an internal reference language that can be used to manipulate various different tags and other metadata in bulk. To accomplish the result desired above, for exapmple, I could format the credit field with the following string:

"Editor.(%<editor>%)"

This would automatically pull the various comma separated tags from the editor field, prepend "Editor." to each tag, and enter them as comma separated tags in the credit field. Additionally, I could use string modifiers to pull from various fields at once, if I felt like it. ie:

$if(%<editor>%,'Editor.'%<editor>%,)$if(%<illustra tor>%,'Illustrator.'%<illustrator>%,)

Does anyone know if something similar is possible in Calibre?

Last edited by Bokononist; 04-10-2015 at 03:00 AM.
Bokononist is offline   Reply With Quote