View Single Post
Old 09-02-2012, 02:45 PM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,228
Karma: 129333566
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by maxpall View Post
Sorry for very late reply: I was out of town for sometimes, and wanted to test the solution proposed before answering.

Thanks, Pepin, for the code you posted. It works fine, a part of some issues (so far), concerning the substr of 40 chr from the title:


First case: In case the last of the 40 characters is a ' ' (empty space), it is cut in the generation of the subdir, and also the title of the file.

EXAMPLE:

the following directory is for Calibre internal structure

"After 2015_ progress and challenges for[two spaces](215)"

but it is exported to device as

"After 2015_ progress and challenges for (215)"
You don't want the eBooks exported in subdirectories created by Calibre. The problem being that if you delete a book from the T1 using the T1, the subdirectory isn't deleted and you will end up with a bunch of empty directories.

Code:
{title} - {authors}
The above is what you want to use when sending to the T1. So it's not going to be an issue about duplicating the directory structure as you don't want it and you don't need it.
JSWolf is offline   Reply With Quote