Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-16-2012, 02:21 PM   #1
Gutenberg
Junior Member
Gutenberg began at the beginning.
 
Posts: 2
Karma: 20
Join Date: Jul 2012
Device: Nook
Save to Disc - Folder name - Period changes to Underscore

I use the following template in Calibre->Preferences->Saving Books To Disc:

{author_sort}/{title}/{authors} - {series}{series_index:0>2s| - | - }{title}

It works great except for the Folder name -- if the author's FN ends with a period (.), the period is replaced by an underscore (_). So, for example, I end up with Folders like these:

Box, C.J_/Blue Heaven/C. J. Box - 2009 Edgars Mystery Awards 01 - Blue Heaven.epub
Parker, Robert B_/Sixkill/Robert B. Parker - Spenser 40 - Sixkill.epub

The {author_sort} variable works fine if I use it elsewhere in the template, and the period is not replaced.

{author_sort}/{title}/{author_sort} - {series}{series_index:0>2s| - | - }{title}

Parker, Robert B_/Sixkill/Parker, Robert B. - Spenser 40 - Sixkill.epub

Is there any way to fix this? I'd prefer to have my folders sorted "LN, FN" so replacing {author_sort} with {authors} is not an option. And I'd rather not have to strip the periods from all author names with abbreviations.

Also, I work on a Mac, so the length limitations on Windows filenames should not be the problem.
Gutenberg is offline   Reply With Quote
Old 09-16-2012, 02:39 PM   #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: 29,778
Karma: 54830978
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 Gutenberg View Post
I use the following template in Calibre->Preferences->Saving Books To Disc:

{author_sort}/{title}/{authors} - {series}{series_index:0>2s| - | - }{title}

It works great except for the Folder name -- if the author's FN ends with a period (.), the period is replaced by an underscore (_). So, for example, I end up with Folders like these:

Box, C.J_/Blue Heaven/C. J. Box - 2009 Edgars Mystery Awards 01 - Blue Heaven.epub
Parker, Robert B_/Sixkill/Robert B. Parker - Spenser 40 - Sixkill.epub

The {author_sort} variable works fine if I use it elsewhere in the template, and the period is not replaced.

{author_sort}/{title}/{author_sort} - {series}{series_index:0>2s| - | - }{title}

Parker, Robert B_/Sixkill/Parker, Robert B. - Spenser 40 - Sixkill.epub

Is there any way to fix this? I'd prefer to have my folders sorted "LN, FN" so replacing {author_sort} with {authors} is not an option. And I'd rather not have to strip the periods from all author names with abbreviations.

Also, I work on a Mac, so the length limitations on Windows filenames should not be the problem.
Period is a reserved character in some OS.
Calibre corrects all filenames to comply with all platforms.
theducks is offline   Reply With Quote
Old 09-16-2012, 03:18 PM   #3
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
Quote:
Originally Posted by theducks View Post
Period is a reserved character in some OS.
Calibre corrects all filenames to comply with all platforms.
Yes. For example, in fat32 the folder "name." is identical to the folder "name".

The blessings/curses of multi platform programs...
Adoby is offline   Reply With Quote
Old 09-16-2012, 04:48 PM   #4
Gutenberg
Junior Member
Gutenberg began at the beginning.
 
Posts: 2
Karma: 20
Join Date: Jul 2012
Device: Nook
Got it. Thanks for the explanation.
Gutenberg is offline   Reply With Quote
Old 09-17-2012, 10:48 AM   #5
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
You could try something fancy like {author_sort:re([.]$,)}

This way it would simply omit the dot at the end instead of replacing it with _
frostschutz is offline   Reply With Quote
Reply

Tags
author_sort, folder, period, save to disc, underscore


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Save to Disc - Folder name / Filename Problems Distorted Vision Library Management 19 03-11-2012 10:37 AM
Can't Save to Disc MickeyC Calibre 2 10-16-2011 09:54 AM
title in save to disc pcalv Library Management 9 08-04-2011 07:11 AM
marking books 'biography' and 'read' to put in same folder on 'save to disc' madeirabhoy Library Management 1 07-09-2011 12:59 PM
0.7.1 Save to Disc function fixed? grizedale Calibre 9 06-07-2010 04:49 PM


All times are GMT -4. The time now is 12:26 AM.


MobileRead.com is a privately owned, operated and funded community.