Custom Genre Hierarchical Column to tags
I've been having issue trying to figure this out over the last several days. I have a Hierarchical custom column called #genre. It its set as text column (not like tags). Examples I have in it:
Fiction.Science Fiction.Space Opera
Non-Fiction.Manual.Appliance.Kitchen
I use the column both in Calibre and Calibre Companion. I also use FBReader and it also allows hierarchical tags BUT it uses the / (backslash) to separate tags instead of the . (period). I want to create a save to disk plugboard that changes the #genre field text to replace the periods with backslashes and adds the result to the tags column.
I haven't even tried to change the save to disk plugboard yet. I've been testing by creating a custom column created from other columns but I haven't had any success. My results are just the exact same data with periods or a Template error.
I tried using the re function
{#genre:re($,'\\','\.')}, program: re(#genre,'\\','\.')} are just some of my attempts. I had very little luck finding good examples of the re function, probably because the name is difficult to search for.
I decided to simplify my test to just using the sublist funciton to replace the periods with commas. I changed the field type to custom column created from other columns, behaves like tags. And tried:
{#genre:sublist(0,0,\.)} and even just trying to get ANY result
{#genre:sublist(0,1,\.)} Unfortunately this just shows the exact same information in the #genre field (i.e. Fiction.Science Fiction.Space Opera)
I was hoping to get both working. I would like to add the hierarchical genre edited to replace the periods with backslashes to the tags list for the save to disk plugboard.
I would also like to get the sublist working so I could edit the Polish template and show the Genres either with commas or even just spaces between the words. I edited the template to add my #genre custom column but because there are no spaces the text goes off the right of the screen. I know I can't use functions in the polish template but I figured I could use a custom column that looked correct for this.
So to reiterate I want a save to disk plugboard that takes
#genre (i.e Fiction.Science Fiction.Space Opera) and converts to
(Fiction/Science Fiction/Space Opera) and then adds to the tags field
I would also like a custom column template that either uses the sublist function or replaces the periods with spaces so the field word wraps correctly on the book jacket created by the polish command
(Non-Fiction.Manual.Appliance.Kitchen to Non-Fiction, Manual, Appliance, Kitchen or Non-Fiction Manual Appliance Kitchen)
Thanks for the help!
|