08-17-2013, 02:34 PM | #1 |
Guru
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
|
How to do conditional literal in plugboard?
On my device I prefer the file to be {series}{series_index:0>2s}-{title}. This works when there's a series & sequence. When there's no series I get the hyphen in front of the title. Can I make the hyphen conditional so it only appears when there's a series? If so, can I also make the index conditional so it only appears when the value is greater than 0? There are some 'series' that are non-sequential. Since Calibre doesn't allow a series without an index the indexes in these are all set to 0.
Thanks. |
08-17-2013, 03:03 PM | #2 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
08-17-2013, 03:04 PM | #3 |
Well trained by Cats
Posts: 29,819
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
http://manual.calibre-ebook.com/template_lang.html
See The Advanced Section for Example: Code:
{series}{series_index:| - | - }{title} It gets real tricky to suppress a 0 index in a Series. I use Zero to indicate a book that belongs to a series, but has no place in the order I use 0.n to order those |
08-17-2013, 03:10 PM | #4 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
{series_index:re(^0*$,)} |
|
08-17-2013, 07:26 PM | #5 |
Well trained by Cats
Posts: 29,819
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Mr {Template}, himself has spoken
|
08-18-2013, 01:11 PM | #6 |
Guru
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
|
Thank you. Should have realized that 'template' was a synonym for plugboard (or vice versa) but i didn't & therefore couldn't find what I wanted. As theducks said I use zero to indicate books that belong to a series but have no place in the order. Usually that's because the series itself is unordered-but now that I think about it, not always. (Some series have short story collections where the individual stories take place scattered throughout the rest of the series. I generally put those as index 0 although I'm starting to split them into the individual stories & place them appropriately when I can.)
Anyway, thanks very much. |
08-18-2013, 02:55 PM | #7 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
And you are welcome. |
|
08-18-2013, 02:59 PM | #8 |
Well trained by Cats
Posts: 29,819
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Calvin
0.n for no place x.0n for a short that fits after x x.yz is what I use for Omnibus X is the start, a non-zero y is the next and Z is the last (and this falls apart after 9 This way it sorts in close order with singles |
08-20-2013, 09:08 AM | #9 |
Guru
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
|
Thanks. I don't think I go that far-if there's no 'place' then I don't care so those are all series(0). If I'm still sequencing the series when I split the collection/omnibus then I number them in order. I only use fractions in special cases (magazines where there's month & year or volume/issue) and when I need to squeeze something into a series I've already sequenced.
To Chaley, don't worry about being pedantic. I'm that way myself at times so I generally find the clarification useful. Thanks. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Literal ampersands in index_to_soup | nickredding | Recipes | 4 | 02-24-2014 09:25 PM |
Adding books, conditional file name matching | cwdavi1 | Library Management | 1 | 02-16-2012 05:33 PM |
Send to device with conditional directories | Doug-W | Devices | 8 | 03-06-2011 10:35 AM |
Spiritual Young, Robert (tr.): Bible: Young's Literal Translation v1. 17 Dec. 08 | ProDigit | BBeB/LRF Books | 4 | 04-25-2009 09:28 PM |
Conditional CSS rules | Jellby | ePub | 10 | 01-20-2009 08:32 AM |