View Single Post
Old 03-08-2015, 02:58 PM   #21
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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)
My save template:
Code:
{author_sort:sublist(0,1,&)}/{title}/{title} - {authors:sublist(0,1,&)}
Same as the default, except if there are multiple authors, then the sublist function ensures only the first author is used.

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:

Adams, John Joseph & Martin, George R. R. & Kirtley, David Barr & Clarke, Susanna & Sherman, Delia & Ford, Jeffrey & Finlay, C. C. & Khanna, Rajan & Valentine, Genevieve & Okorafor, Nnedi & Leahy, Krista Hoeppner & Card, Orson Scott & Silverberg, Robert & Wagner, Wendy N. & Link, Kelly & Gaiman, Neil & Yant, Christie & Resnick, Mike & Chima, Cinda Williams & Castro, Adam-Troy & Lee, Yoon Ha & Grossman, Lev & Green, Simon R. & Pratt, T. A. & Tolbert, Jeremiah & Howard, Jonathan L. & Farland, David & Kaftan, Vylar & Boskovich, Desirina & Beagle, Peter S. & Guin, Ursula K. Le & Fultz, John R. & Bradley, Marion Zimmer/The Way of the Wizard/The Way of the Wizard - 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.azw3


Going back to the original template:

Code:
{series:'test($, strcat("_", field('series'), " - ",field('authors')), field('authors'))'}/{series_index:0>4s| | - }{title} - {authors}
I would use

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,&)}
All books will pretend, for the purposes of the save filename, that they only have one author -- the first. As long as the series' in question share the first author in common, this should work. (There are series' out there that are written by multiple people as a collaborative effort. But then, those series' are just as likely to have one author per book, in which case the problem would be there anyway.)

Last edited by eschwartz; 03-08-2015 at 03:04 PM.
eschwartz is offline   Reply With Quote