View Single Post
Old 06-18-2022, 10:33 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,099
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
WAY back when, when I got my first EZreader. It only used the file system, so I wanted folders. @CHALEY kindly supplied a template that divided things into 2 tree paths:
00noseries /Author-group/ Author
series /series-group /Series

I tweaked that later, any lousy code is mine (attached # Calibre Send to Device template 11/2013)
Code:
program:test(field('series'),strcat(
substr(field('series'), 0, 1),template("-series/{series:subitems(0,1)||/}{series:subitems(1,2)||/}{series_index:0>5.2s}-{title}_{authors}")
),template("00noseries/{author_sort[0]}_authors/{authors}/{title}-{authors}")
)
Numbers are in front to get it to Alpha Sort

This might give you some ideas
theducks is offline   Reply With Quote