11-29-2020, 04:32 PM | #1 |
Member
Posts: 16
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 |
11-29-2020, 07:02 PM | #2 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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 | |
|
11-29-2020, 07:03 PM | #3 |
Member
Posts: 16
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?
|
11-29-2020, 08:08 PM | #4 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
11-29-2020, 08:12 PM | #5 |
Member
Posts: 16
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 | |
|
11-29-2020, 08:14 PM | #6 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
11-29-2020, 08:44 PM | #7 |
Grand Sorcerer
Posts: 12,168
Karma: 73448616
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
|
11-29-2020, 09:10 PM | #8 |
Member
Posts: 16
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. |
11-29-2020, 10:42 PM | #9 |
Grand Sorcerer
Posts: 12,168
Karma: 73448616
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. |
11-29-2020, 10:48 PM | #10 |
Member
Posts: 16
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-29-2020, 11:55 PM | #11 |
Bibliophagist
Posts: 35,434
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, 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.
|
11-30-2020, 03:18 AM | #12 | |
The Grand Mouse 高貴的老鼠
Posts: 71,510
Karma: 306214458
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? |
|
11-30-2020, 04:09 AM | #13 |
null operator (he/him)
Posts: 20,572
Karma: 26954694
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 |
11-30-2020, 09:46 AM | #14 |
Well trained by Cats
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
11-30-2020, 10:52 AM | #15 |
Resident Curmudgeon
Posts: 73,987
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, 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 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Editor - Global Search/Replace of underscore format | Canoe | Editor | 1 | 07-11-2015 10:57 PM |
Books in Calibre folder don't turn up in search | montalex | Library Management | 16 | 04-20-2014 04:08 PM |
Books in Calibre folder don't turn up in search | montalex | Library Management | 5 | 01-07-2014 11:17 PM |
Save to Disc - Folder name - Period changes to Underscore | Gutenberg | Library Management | 4 | 09-17-2012 10:48 AM |
K3:Don't see new photo folder I just added | FF2 | Amazon Kindle | 3 | 10-24-2010 05:10 PM |