View Single Post
Old 12-30-2013, 10:26 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,098
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by arturg View Post
Hello all,

I have a Cybook Opus reader and it supports having folders which are visible in library browsing so basically I can keep my educational epubs in one folder and fiction in another folder.

How can I make it so that in Calibre I can set which folder the book will be uploaded into? Is it even possible?
Yes it is possible if you have the supporting metadata set in calibre:
The magik is in the templates. slash means folder
{#mysection}\{authors} - {Title}

If you set your custom column: {My Section} to 1 of 2 values (Edu or Fict. Keep the names short to avoid pathname issues with long titles) they will end up in those folders as set
The template language is very powerful (and can be mind boggling ), The simple form as shown on the Save to device configuration form is pretty strait forward.
This one (provided by chaley) is also for a folder based device (only 8 entries per screen). Note: the use of literal values (in blue)

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}_{id}")
),template("00noseries/{author_sort[0]}_authors/{authors}/{title}-{authors}_{id}")
)
What it does is sorts books into 2 groups:series and non-series
In Series, it breaks the series down by first letter into folders: eg S_series, then the typical sort
non-series books are filed in 00noseries folder, then by Authors Last initial folders: eg W_authors (I chose 00noseries so the folder appears at the beginning of the folder list on my device)
HTH
theducks is offline   Reply With Quote