|
|
#1 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Kindle Paperwhite
|
Help with Syntax please.....
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 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 286
Karma: 149086
Join Date: May 2009
Location: The Right Coast
Device: PC & Smartphone
|
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.
|
|
|
|
|
Enthusiast
|
|
|
|
#3 | |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Kindle Paperwhite
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,208
Karma: 31947102
Join Date: Nov 2007
Location: Toronto
Device: Wifi (mine); Touch (wife + mine); iTouch (wife)
|
Does
Code:
{authors}{series_index:0>2s| - (Book | of}{series:| "|")}
__________________
Peter |
|
|
|
|
|
#5 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Kindle Paperwhite
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| 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 |