Mobileread
Change characters in metadata title and filenames on disk
#1  NickKnaque 10-21-2019, 09:51 AM
I use Calibre on Windows (7 & 10) and on Linux, in all of those environments I want to save my C++ books to disk leaving C++ as it appears in the title, instead of converting to C__ as it does by default. (I hate this!)

Is there a tweak or something to manage this? I'd rather not hack the Python source as I like to run from exe.

Also, I'd like to have the : in book titles changed to a comma "," (instead of _) both in metadata and in the filename on disk.

All help gratefully received.
Reply 

#2  Horus68 10-21-2019, 11:54 AM
Quote NickKnaque
Also, I'd like to have the : in book titles changed to a comma "," (instead of _) both in metadata and in the filename on disk.
On the : for a comma see here: https://www.mobileread.com/forums/sh...d.php?t=310144
Reply 

#3  NickKnaque 10-22-2019, 08:26 AM
Thank you
Reply 

#4  NickKnaque 10-22-2019, 10:08 AM
Using title:re() in the template for save-to-disk does not solve the C__ (instead of C++) in the filename, for me. It seems something more fundamental is changing the string after the template has run.

But what, and how can I change it?
Reply 

#5  theducks 10-22-2019, 10:19 AM
Quote NickKnaque
Using title:re() in the template for save-to-disk does not solve the C__ (instead of C++) in the filename, for me. It seems something more fundamental is changing the string after the template has run.

But what, and how can I change it?
+ is the file concatenation character in Windows
file1+file2+file3>fileall
Reply 

#6  NickKnaque 10-22-2019, 10:25 AM
Thanks, but that does not matter, both Windows & Linux support '+' in filenames.
Reply 

#7  BetterRed 10-22-2019, 06:53 PM
Quote NickKnaque
Thanks, but that does not matter, both Windows & Linux support '+' in filenames.


If it's allowable in Linux and Windows (and as far as know on MacOS too), the question is: why is '+' replaced with '_' in the library file name?

Given that '#', '$', '&', '-' etc are not replaced.

I get why \/:*?"<>| are replaced, but not anything else. And I'm not 100% certain it's been ever thus.

BR
Reply 

#8  DNSB 10-22-2019, 07:18 PM
Quote BetterRed

If it's allowable in Linux and Windows (and as far as know on MacOS too), the question is: why is '+' replaced with '_' in the library file name?

Given that '#', '$', '&', '-' etc are not replaced.

I get why \/:*?"<>| are replaced, but not anything else. And I'm not 100% certain it's been ever thus.
PC/DR/MS-DOS did not allow the '+' sign as a character in a filename. And I vaguely remember when saving to a floppy (sadly, dating myself there...), you could not use a '+' in a filename saved from Windows 95. Going by a old DRDOS manual, you could not use any of " * + , / : ; < = > ? \ [ ] | in a filename and a space could not be used as the first character of a filename.
Reply 

#9  BetterRed 10-22-2019, 07:52 PM
Quote DNSB
PC/DR/MS-DOS did not allow the '+' sign as a character in a filename. And I vaguely remember when saving to a floppy (sadly, dating myself there...), you could not use a '+' in a filename saved from Windows 95. Going by a old DRDOS manual, you could not use any of " * + , / : ; < = > ? \ [ ] | in a filename and a space could not be used as the first character of a filename.
Arrh right, +,.;=[] are not allowed in short (8.3) files names - but with the exception of '+' they are allowed in book file names, hence save names.

BR
Reply 

#10  JSWolf 10-23-2019, 12:50 PM
Quote DNSB
PC/DR/MS-DOS did not allow the '+' sign as a character in a filename. And I vaguely remember when saving to a floppy (sadly, dating myself there...), you could not use a '+' in a filename saved from Windows 95. Going by a old DRDOS manual, you could not use any of " * + , / : ; < = > ? \ [ ] | in a filename and a space could not be used as the first character of a filename.
But, if you are able to run Calibre, you will not be running any version of DOS. And you won't be caring about old 8.3 filenames. So I see no reason not to allow +.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register