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 04-15-2021, 04:43 PM   #1
mcandre
Connoisseur
mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!
 
Posts: 57
Karma: 5000
Join Date: Oct 2012
Device: Kindle
How to stop strict filename sanitization?

Calibre insists on renaming my books, dropping non-alphanumeric characters including even a basic plus sign (+). These are being converted to underscores (_) which I find annoying and more confusing than helpful.

How do I customize Calibre's filename sanitization rules so that I can preserve more of the book titles and authors in the filename as regular old characters?
mcandre is offline   Reply With Quote
Old 04-15-2021, 04:48 PM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,666
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
https://www.mobileread.com/forums/sh...d.php?t=119175

the sanitization is for cross-platform compatibility. It cannot be change.

Last edited by ownedbycats; 04-15-2021 at 04:50 PM.
ownedbycats is offline   Reply With Quote
Advert
Old 04-15-2021, 05:15 PM   #3
mcandre
Connoisseur
mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!mcandre , Klaatu Barada Niktu!
 
Posts: 57
Karma: 5000
Join Date: Oct 2012
Device: Kindle
Which file system can't handle plus sign? Unless you want to explain how Calibre supports MSDOS but not titles with "X++".
mcandre is offline   Reply With Quote
Old 04-15-2021, 06:07 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,757
Karma: 168431891
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by mcandre View Post
Which file system can't handle plus sign? Unless you want to explain how Calibre supports MSDOS but not titles with "X++".
Have you looked at the character in filename restrictions for all versions of Windows, Mac OSX and Linux with their multiple file systems? Not to mention the additional restrictions on filenames and web services. You might want to check the Characters to Avoid in Directories and Filenames on the MTU website.

What is renamed is the copy of the book stored in calibre's library which you should not be looking at. The calibre GUI, command line tools, etc. will display the book title. So stop peeking under the skirts and treat the calibre library as the black box it is intended to be.

Last edited by DNSB; 04-15-2021 at 06:10 PM.
DNSB is offline   Reply With Quote
Old 04-15-2021, 06:28 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,618
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by mcandre View Post
Which file system can't handle plus sign? Unless you want to explain how Calibre supports MSDOS but not titles with "X++".
There are other factors at play, some platforms don't support characters such as Ü and è, some platforms have name length restrictions etc - so the approach taken is to translate everything into ASCII, substitute all special characters with underscore ('_') and truncate as required.

Calibre puts format files etc into folders, rather than the database, for performance reasons. The reason it derives the arbitrary folder and file names from the title and first author names is because… the alternative would have been something like database row numbers, or UUIDs.

The core of calibre is its database, not the file system.

BR
BetterRed is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
e-book vendor that is a little less strict about regional limits (buying from Europe) ametzler General Discussions 16 10-21-2014 05:56 AM
A too strict decision? - Check Book with parsing errors arspr Editor 2 08-08-2014 06:11 PM
News Recipes Q's: Filename logic, subdirectory creation, stop cover and OPF? spedinfargo Calibre 5 06-20-2011 06:12 PM
Does it have to be XHTML 1.1 Strict? AlexBell ePub 7 07-18-2009 07:51 AM


All times are GMT -4. The time now is 04:03 AM.


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