![]() |
#541 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,352
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#542 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,227
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You could probably get it to use one of the various unicode spaces like the non-breaking space or the thin space/thick space. I doubt those space characters are compressed.
|
![]() |
![]() |
![]() |
#543 |
Zealot
![]() Posts: 116
Karma: 10
Join Date: Jun 2011
Location: Stockport, UK
Device: ipad, iphone, kindle
|
Aaaargh!! Thought you had cracked it then but....
PLUGBOARD TEMPLATE ERROR format: type d requires an integer.. Can't handle my 0.25 series numbers :-( I give up :-( |
![]() |
![]() |
![]() |
#544 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,352
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
{series_index:_>7.2f} |
|
![]() |
![]() |
![]() |
#545 |
Zealot
![]() Posts: 116
Karma: 10
Join Date: Jun 2011
Location: Stockport, UK
Device: ipad, iphone, kindle
|
FINALLY
![]() ![]() WOOOOOO ![]() I owe you a pint ![]() |
![]() |
![]() |
![]() |
#546 |
Zealot
![]() Posts: 116
Karma: 10
Join Date: Jun 2011
Location: Stockport, UK
Device: ipad, iphone, kindle
|
OK, now I know it can be done - is there any simple, easy way to swap plugboards so I can use the simple setup for most books and then use this for those awkward series?
|
![]() |
![]() |
![]() |
#547 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Use a custom column to set which ones deserve the new template (or tag them) and do a list lookup to determine which template to use. When I get on the computer I will work out a general program mode template to do it, assuming no one beats me to it.
|
![]() |
![]() |
![]() |
#548 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Okay, so assuming you want "Series Name [03] Book Title" as per post #533.
series_index should be prepended with underscores, to bump it up to 4 digits. If the custom column "#complex_series" is set to true -- I'll just test if it has any value -- it will add two decimal places. Mark each awkward series with this. (This would be easier if I could figure out how to test within a template for a numer with decimals.) Template should be: Code:
program: ser_num = test( field('#complex_series'), finish_formatting( field('series_index'), '_>7.2f', ' [', '] ' ), finish_formatting( field('series_index'), '_>4d', ' [', '] ' ), ); strcat( field('series'), ser_num, field('title') ) Last edited by eschwartz; 09-05-2014 at 03:18 PM. |
![]() |
![]() |
![]() |
#549 |
Zealot
![]() Posts: 116
Karma: 10
Join Date: Jun 2011
Location: Stockport, UK
Device: ipad, iphone, kindle
|
O.....K......
Mind officially blown ![]() At moment I am using metadata plugboard which allows me to email any book to my kindle and get it formatted as I want. So, idiot instructions please. Where does this code go and how do I alter my workflow to use it?? |
![]() |
![]() |
![]() |
#550 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,352
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: sindex = raw_field("series_index"); cmp(format_number(sindex, '{0:d}'), format_number(sindex, '{0:f}'), 'not int', 'int', 'not int') |
|
![]() |
![]() |
![]() |
#551 |
Zealot
![]() Posts: 116
Karma: 10
Join Date: Jun 2011
Location: Stockport, UK
Device: ipad, iphone, kindle
|
Chaley, if that checks on a per-item basis it won't trigger for all the books in the series, just those with fractions?
|
![]() |
![]() |
![]() |
#552 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,352
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
I have a python "script" that puts the correct format for a series into a custom column. It looks at all books in the series, figures out whether it needs decimals and how many leading zeros (could be underscores) are required, and then writes the correct format for "format_number" to the custom column for each book in the series. The script is run from the command line with calibre-debug -e. I mention this mostly to agree that I was being dense, especially as I had already solved this problem in a different way, but if you are comfortable with this sort of thing you are welcome to use the script appropriately modified. The script is: Spoiler:
|
|
![]() |
![]() |
![]() |
#553 | ||
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
![]() ![]() Quote:
![]() Last edited by eschwartz; 09-07-2014 at 12:21 AM. |
||
![]() |
![]() |
![]() |
#554 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,277
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
delete post
Last edited by JSWolf; 09-07-2014 at 01:34 AM. |
![]() |
![]() |
![]() |
#555 |
Hack
![]() Posts: 34
Karma: 12
Join Date: Dec 2009
Device: Kobo Aura HD, Kindle Paperwhite
|
composite column template TRUE if ONLY format = PDF
I thought this would be easy, but I am totally lost.
I know how to do a search for only PDF by excluding other formats, but I don't know how to use the template language to do the same... Can someone give me a quick pointer? |
![]() |
![]() |
![]() |
Tags |
custom column, tag, tags |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom column i need a little help | shinken | Calibre | 3 | 09-15-2010 03:41 AM |
Using Custom Metadata in Save Template | EJvdH | Calibre | 1 | 07-02-2010 06:06 AM |
Accessories Decalgirl Kindle 2 custom skin template | srmalloy | Amazon Kindle | 6 | 04-09-2010 09:55 PM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |