![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
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 |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 644
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
|
Wild guess, but you might need to escape the parenthesis and quotation characters.
If I'm correct, calibre is interpreting these as programming instructions for how it should process the equation. Not as output instructions for the plugboard. Of course I could also be totally wrong. ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
Quote:
|
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,569
Karma: 74358018
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Does
Code:
{authors}{series_index:0>2s| - (Book | of}{series:| "|")} |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
syntax tags | MMAC | Library Management | 1 | 02-29-2012 03:51 PM |
Help with plugboard syntax, please | Ptarmigan | Library Management | 3 | 02-15-2012 05:44 AM |
Help with search syntax please. | rwelbourn | Library Management | 3 | 04-16-2011 02:07 AM |
Markdown Syntax in Comments | itimpi | Calibre | 11 | 01-25-2011 11:28 AM |
Removing header syntax. | boromirofborg | Calibre | 0 | 07-21-2010 12:33 AM |