View Single Post
Old 01-30-2013, 08:33 PM   #1
Hendrixxxxxxxx
Enthusiast
Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.Hendrixxxxxxxx knows how many angels can dance on the head of a pin.
 
Posts: 29
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Kindle Paperwhite
Help with Syntax please.....

I have been playing around with plugboard, and I have got most of the way to where I want to be, but, having zero experience with template language, I am a bit stuck on one small issue, which I was wondering if someone could help me with.

I have the following plugboard template:

{authors}{series_index:0>2s| - Book | of }{series}

which works beautifully, and gives me an output in the "authors" field on my paperwhite such as this:

J K Rowling - Book 07 of Harry Potter

I would like, if possible, the output to look like this:

J K Rowling - (Book 07 of "Harry Potter")

Using the following syntax:

{authors}{series_index:0>2s| - (Book | of }"{series}")

I can get the output I want if the book is part of a series, which is great. However, if the book is not part of a series (if the series field is empty), the output looks like this:

J K Rowling"")

rather than just

J K Rowling

Is, what I am trying to do possible, and if so, where am I going wrong with the syntax please? I have tried to use the calibre manual for clues as to what the problem is, but its all way over my head.

Thanks in advance

Hendrix
Hendrixxxxxxxx is offline   Reply With Quote