03-08-2015, 01:35 PM | #16 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
03-08-2015, 01:40 PM | #17 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
Advert | |
|
03-08-2015, 01:53 PM | #18 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
Thanks for all your help folks.
@chaley: your provides strings with various does not work, i still get different series - author folders. I think i have to put more time in this which i do not have for now BTW, it is not so important to put a Various or first author to the folder name in case of various authors, there could be none, but in case there is only ONE author i would like to have the author after the series name in the folder. For now i think i stay with a simple series folder Thanks again Last edited by Thomas_AR; 03-08-2015 at 01:57 PM. |
03-08-2015, 02:00 PM | #19 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Yes, and I solve the problem by truncating the authors field after the first author.
That might or might not work for you -- it does for me. Usually happens with anthologies for me, in which case I get the editor. |
03-08-2015, 02:18 PM | #20 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
Sorry i may not be on top of this. What do you mean?
|
Advert | |
|
03-08-2015, 02:58 PM | #21 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
My save template:
Code:
{author_sort:sublist(0,1,&)}/{title}/{title} - {authors:sublist(0,1,&)} Example: The Way of the Wizard, by: John Joseph Adams & George R. R. Martin & David Barr Kirtley & Susanna Clarke & Delia Sherman & Jeffrey Ford & C. C. Finlay & Rajan Khanna & Genevieve Valentine & Nnedi Okorafor & Krista Hoeppner Leahy & Orson Scott Card & Robert Silverberg & Wendy N. Wagner & Kelly Link & Neil Gaiman & Christie Yant & Mike Resnick & Cinda Williams Chima & Adam-Troy Castro & Yoon Ha Lee & Lev Grossman & Simon R. Green & T. A. Pratt & Jeremiah Tolbert & Jonathan L. Howard & David Farland & Vylar Kaftan & Desirina Boskovich & Peter S. Beagle & Ursula K. Le Guin & John R. Fultz & Marion Zimmer Bradley Obviously, that is a bad time to be saving all authors as the filename. So sublisting the authors field means it gets sent as "Adams, John Joseph/The Way of the Wizard/The Way of the Wizard - John Joseph Adams.azw3" This is a massive improvement over: Spoiler:
Going back to the original template: Code:
{series:'test($, strcat("_", field('series'), " - ",field('authors')), field('authors'))'}/{series_index:0>4s| | - }{title} - {authors} Code:
{series:'test($, strcat("_", field('series'), " - ",sublist(field('authors'),0,1,&)), sublist(field('authors'),0,1,&))'}/{series_index:0>4s| | - }{title} - {authors:sublist(0,1,&)} Last edited by eschwartz; 03-08-2015 at 03:04 PM. |
03-08-2015, 03:14 PM | #22 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
Thanks again.
Tried: Code:
{series:'test($, strcat("_", field('series'), " - ",sublist(field('authors'),0,1,&)), sublist(field('authors'),0,1,&))'}/{series_index:0>4s| | - }{title} - {authors:sublist(0,1,&)} EXCEPTION: Formatter: failed to scan program. Invalid input &)), sublist(field('authors'),0,1,&)) near ( |
03-08-2015, 03:43 PM | #23 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Whoopsies, I got confused between the different template modes -- function mode doesn't require quote, template program mode (TPM) and general program mode (GPM) do.
That should've been: Code:
{series:'test($, strcat("_", field('series'), " - ",sublist(field('authors'),'0','1','&')), sublist(field('authors'),'0','1','&'))'}/{series_index:0>4s| | - }{title} - {authors:sublist(0,1,&)} Code:
program: short_authors = sublist(field('authors'), '0', '1', '&'); sindex = finish_formatting(field('series'), '0>4s', '', ' - '); strcat( test( field('series'), strcat("_", field('series'), " - ", short_authors), short_authors ), '/', sindex, field('title'), ' - ', short_authors) |
03-08-2015, 05:29 PM | #24 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
This is getting funny. Just tested both of your posted templates/program.
Still got different folders "series - author" for each author. Well perhaps it would be easier to do something like: If series has different authors folder name has only series name, if one author we will get "series - author". But do not worry folks , for now i am happy with the easy series folder name for all. Later i will read more of the tutorial, perhaps i find the thinking problem or a more elegant solution. Thanks again for your help and patience. |
03-09-2015, 05:07 AM | #25 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
@Thomas_AR: are you testing the templates by sending a book to the device that is already on the device? If so, then you are probably running into a calibre wireless device driver feature that prevents duplicate books on the device when metadata changes. If the WD detects a book with the same unique ID (UUID) and format already on the device then the template is ignored and the current path on the device is used.
There are two ways to avoid this behavior.
|
03-09-2015, 06:52 PM | #26 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
Thanks for your answer.
yes i always delete the book via Calibre on CC, restart both applications, and those books have a unique id and i have option "Replace books with same calibre ID" as i have epub and comics with the same name. next weekend i will have a closer look at all this again. Thanks again for your help. Thomas |
03-09-2015, 11:19 PM | #27 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
Well here we go again, i am going to make it less complicated - LOL:
I noticed that the only series i have which contain various authors are those who contain in the series name "Rhodan" New goal is now: 1. Series with various Authors: _ Series/0001 - title - author 2. Series with one author: _ Series - Author/0001 - title - author 3. Books with no series: author/Title - author Using: Code:
{series:|_ |} {series:contains(Perry Rhodan,, - )} {series:lookup(Perry Rhodan,,authors)}/{series_index:0>4s| | - }{title} - {authors} I get "- author/title - author. There should not be a "-" in front of the author folder-name. I am getting crazy Thomas Last edited by Thomas_AR; 03-09-2015 at 11:36 PM. |
03-09-2015, 11:55 PM | #28 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Err, because if series doesn't contains() the text "Perry Rhodan", you replace series with " - " -- that also applies if the series is just plain empty...
Try: Code:
{series:'in_list($, "&", "Perry Rhodan", strcat($, ' - '), $)'|_ | }{series:lookup(Perry Rhodan,,authors)}/{series_index:0>4s| | - }{title} - {authors} Last edited by eschwartz; 03-10-2015 at 12:11 AM. |
03-09-2015, 11:58 PM | #29 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
Code:
{series:'in_list($, "Perry Rhodan", strcat($, ' - '), $)'|_ |}{series:lookup(Perry Rhodan,,authors)}/{series_index:0>4s| | - }{title} - {authors} Last edited by Thomas_AR; 03-10-2015 at 12:02 AM. |
03-10-2015, 12:12 AM | #30 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Fixed. Today is stupid-typos-day I see...
(rant: I fixed that twice in the template tester in calibre -- it still migrated to my post! What the....) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Send to device - Template help | Snow Sciles | Library Management | 12 | 05-26-2014 05:16 PM |
Generic "Sending to Device" template not kicking in on Folder Device | At_Libitum | Library Management | 2 | 11-01-2013 07:12 AM |
Save to Device template | HFC3 | Library Management | 6 | 07-08-2013 11:48 AM |
Save template for sending books to Kindle 3 | Eaglebeak60 | Devices | 2 | 02-14-2011 06:12 PM |
Send to device template | rockeh | Calibre | 6 | 08-17-2010 05:28 PM |