Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-14-2012, 08:24 AM   #1
Ptarmigan
Junior Member
Ptarmigan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2012
Device: Kindle
Help with plugboard syntax, please

I'm trying to add series metadata (series and series_index) to the title when sending to my Kindle. Perversely, however, I want to add it at the end of the title than at the beginning, thus:

Quote:
A Princess of Mars (John Carter of Mars 01)
Gods of Mars (John Carter of Mars 02)
etc.

I've looked at the plugboard techniques sticky and the examples therein, plus the templates language section of the manual and after much furrowing of the brow and scratching of the head, I've come up with the following:

Code:
{title}{series:| (|}{series_index:0>2s| |)}
Unfortunately, when I close the plugboard editing dialog box, it changes what I've written to this:

Code:
{title}{series:|(|}{series_index:0>2s| |)}
with no space before the opening bracket, which leads to this:

Quote:
A Princess of Mars(John Carter of Mars 01)
Gods of Mars(John Carter of Mars 02)
etc.

Again, no space between the end of the title and the opening bracket enclosing the series info. Not the end of the world, but aesthetically displeasing.

Earlier, when I included an extraneous pipe, I got an error message about incorrect syntax when trying to save the plugboard, but didn't with the above. Nevertheless, I'm guessing that there is still something wrong with the syntax and Calibre is trying to correct it on saving. However, I've now reached the limits of my understanding.

So, can some kind soul point out what I'm doing wrong?

Thanks.
Ptarmigan is offline   Reply With Quote
Old 02-14-2012, 10:15 AM   #2
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,902
Karma: 1216548
Join Date: Jan 2010
Location: France
Device: Many android devices
Hard to say what you are doing wrong, because it works fine for me.

After adding the space, are you pressing both the save plugboard button and the apply button at the top left?

Is the space gone from the template in the "existing plugboards" box after you press the save plugboard button? What I see after pressing the button is
Code:
any format:any device = ([{title}{series:| (|}{series_index:0>2s| |)}] -> title)
The space is there.

Is more than one plugboard defined? It could be that a more specific plugboard without the space is being used in lieu of a more general one that you are changing.

If for some reason you can't make it work correctly (gremlins), put the space between {title} and {series}. It will be removed if there is no series, because leading and trailing spaces are always stripped after the template is executed.
chaley is offline   Reply With Quote
 
Advertisement
Old 02-14-2012, 11:47 AM   #3
Ptarmigan
Junior Member
Ptarmigan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2012
Device: Kindle
Pretty sure I clicked both, but it's the sort of thing I could have easily forgotten to do after concentrating on getting the syntax right. I think the space was there after I clicked Save; it was after I'd closed the dialog box--or rather after I'd reopened it--that it had disappeared.

I'll try again this evening, making sure I click Save *and* Apply. Thanks for your help. Thanks also for the tip about trailing spaces being trimmed. That should provide a workaround if I can't get it to work properly.

Oh, and no, only that one plugboard defined.

Last edited by Ptarmigan; 02-14-2012 at 11:48 AM. Reason: to add that only one plugboard was defined
Ptarmigan is offline   Reply With Quote
Old 02-15-2012, 06:44 AM   #4
Ptarmigan
Junior Member
Ptarmigan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2012
Device: Kindle
Tried it again last night and it worked fine. You were right: I must have not clicked one or other of Save and Apply. Thanks again for your help.
Ptarmigan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with search syntax please. rwelbourn Library Management 3 04-16-2011 03:07 AM
SacBee print_version syntax thczv Recipes 6 04-12-2011 10:38 AM
Markdown Syntax in Comments itimpi Calibre 11 01-25-2011 12:28 PM
Metadata Filename Syntax gandor62 Calibre 15 07-18-2010 04:46 AM
Invalid Syntax Error msprang Sony Reader 7 11-07-2009 02:11 PM


All times are GMT -4. The time now is 08:45 PM.


MobileRead.com is a privately owned, operated and funded community.