![]() |
#1 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2020
Device: Kindle
|
Don't replace dot with underscore in folder name
I've searched here and seen a few posts about this but nothing that resolves the issue. On Linux, a folder name like "Rowling, J. K." is completely legal so there is no reason to replace the final dot with an underscore, is there some way I can turn this off or override it?
I think I figured this out years ago but I don't remember the solution. Thanks |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,014
Karma: 39102633
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
|
Ill Eagle = Sick bird
Calibre makes file names that are VALID cross (all 3) platform. So it may be valid for Linux, but it is not for Win |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2020
Device: Kindle
|
I understand but this book will never see Windows operating system, so is there some way to override it?
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,014
Karma: 39102633
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
|
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2020
Device: Kindle
|
Is this Kovid's answer or just your opinion? I mean if I have to I'll write a plugin to do it myself but I hope I don't have to go that far.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,014
Karma: 39102633
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
|
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,210
Karma: 61896319
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Just to be clear; is your question referring to the copy of the book stored within the calibre library? If so check out the sticky threads in this subforun
|
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2020
Device: Kindle
|
Yes, the copy of the book in the library. I didn't see anything specific but I'll keep looking. I did see this but I'm not really wanting to change the folder structure. Best I can tell there is no linkage to the filesystem in the database, maybe I'm wrong and I'll find out if I am. That's why you make backups
![]() For anyone that comes to this after me, for now the easiest fix that I know is to create a shell script and run it with cron or as-needed. With the rename command this is trivial. apt-get install rename fix-ebook-filenames.sh: #!/bin/bash # Calibre won't write the directory names properly, this will correct the directory names dir="$1" shift if [[ "$#" -ne 1 ]]; then echo "A directory is required" exit 1 fi if [[ -d "$dir" ]]; then cd "$dir" || exit 1 rename "$@" 's/_/\./' ./* fi -- Then you can run it with /path/to/fix-ebook-filenames.sh /path/to/library Any additional command line options go to the rename command. |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,210
Karma: 61896319
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
But doing that will break calibre. The standard advice is to treat the entire file structure that is the calibre library as a black box to be left alone.
If you want content in the format / structure that YOU want do a "Save to disc" and use a template that YOU select. |
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 14
Karma: 10
Join Date: Oct 2020
Device: Kindle
|
You're right, it does seem like there are some references in the database. I can probably just do the modifications to the database in a python script. I hear what you're saying but it's not ever going to be a black box to me.
|
![]() |
![]() |
![]() |
#11 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,407
Karma: 53498385
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
|
You can do what you want but please don't complain or ask for help when you turn your library into a bit bucket.
|
![]() |
![]() |
![]() |
#12 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 66,656
Karma: 285999999
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
Any use of the file outside the calibre library should be by transferring it to a device or by exporting. For both those cases you can affect the formatting of the folder and file names. Why are you concerned with the name of the folder inside the calibre library? |
|
![]() |
![]() |
![]() |
#13 |
null operator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 16,982
Karma: 19749604
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@mfaine1 - the folder and file names within the library are arbitrary
Another developer might have taken an obscurantist approach by using the database author and book table row numbers to name library folders and files. Instead the developer of calibre chose to implement a solution based on author names and book titles that are acceptable to the various platforms that calibre supports (operating + file system), and be comprehensible to us mere mortals. BR |
![]() |
![]() |
![]() |
#14 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 26,014
Karma: 39102633
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
|
|
![]() |
![]() |
![]() |
#15 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61,840
Karma: 88645836
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
|
No you can't do your modification to the database with a any script because if you do, you WILL BREAK your database. Do you want a broken database? That will make it harder to get those broken book out of Calibre and on your reading device.
|
![]() |
![]() |
![]() |
Tags |
folder name, templates |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Editor - Global Search/Replace of underscore format | Canoe | Editor | 1 | 07-11-2015 11:57 PM |
Books in Calibre folder don't turn up in search | montalex | Library Management | 16 | 04-20-2014 05:08 PM |
Books in Calibre folder don't turn up in search | montalex | Library Management | 5 | 01-08-2014 12:17 AM |
Save to Disc - Folder name - Period changes to Underscore | Gutenberg | Library Management | 4 | 09-17-2012 11:48 AM |
K3:Don't see new photo folder I just added | FF2 | Amazon Kindle | 3 | 10-24-2010 06:10 PM |