View Single Post
Old 10-21-2011, 04:35 PM   #1
uli
Zealot
uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.
 
Posts: 109
Karma: 194274
Join Date: Jun 2011
Location: Montreal
Device: Kobo, Calibre
Lightbulb Plugboard: Series Contains Star Wars formatting

I'd like the plugboard to use a different formatting when the series is Star Wars or Star Trek. So I created the following, everything works except if the title contains a comma or a parenthesis.

The calibre template guide mentions you need to escape these. How can I escape a field value?

Code:
{series:contains(Star Wars|Star Trek, {title}, {series}{series_index:0>2s| - | - }{title})}

Bad Solution:
Spoiler:

Created a custom column to escape the offending commas
Code:
#clean_title
{title:re(\,,\\,)}
Code:
{series:contains(Star Wars|Star Trek, {#clean_title}, {series}{series_index:0>2s| - | - }{#clean_title})}


The solution is to use program mode in the plugboard mentioned bellow.

Last edited by uli; 10-22-2011 at 12:52 PM. Reason: solution
uli is offline   Reply With Quote