View Single Post
Old 09-01-2012, 06:17 PM   #14
maxpall
Junior Member
maxpall began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jun 2012
Device: Sony TS1
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)"


Second case: if the book's title has a two subsequent empty spaces, it is reduced to one in exporting

EXAMPLE:

the following directory is for Calibre internal structure

"After 2015 -[two spaces]Contexts, politics and pro (225)"

but it is exported to device as

"After 2015 - Contexts, politics and pro (225)"


Third case: ? In this third case I0m not able to understand: an underscore at the place of an empty space

EXAMPLE:

the following directory is for Calibre internal structure

"Post-2015 policymaking What is being pl (222)"

but it is exported to device as

"Post-2015 policymaking_What is being pla (222)"


Thanks again!


Max

Last edited by maxpall; 09-01-2012 at 06:21 PM.
maxpall is offline   Reply With Quote