12-30-2013, 07:52 PM | #1 |
Groupie
Posts: 181
Karma: 478
Join Date: Oct 2009
Device: Android & FBReader
|
Calibre appending numbers to the book folders
I just spent a few days straightening out my Calibre library. While Calibre was shutdown I moved the library, made a backup (just in case) deleted all the OPF files and metadata files and pored through the folders deleting duplicates, fixing author names and fixing case names and corrupted names on files and folders. It was a lot of work but it was the most efficient way to fix the mess I had created with poor management.
I reopened Calibre and of course the library was empty, I imported the fixed books back into the library and everything came out fine. One thing I was wondering is why Calibre puts numbers at the end of the book name folders? During my "fix" session I took them out and Calibre added more back in - visible when viewing the library in Explorer. I am more curious than anything as to what these numbers do? I notice the Calibre does not keep the numbers in the folder names when using the Save to Disk feature. |
12-30-2013, 07:58 PM | #2 |
Grand Sorcerer
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
The basic answer is, "that's how calibre works". Have a read of the sticky post https://www.mobileread.com/forums/sho...d.php?t=119175 for some more details.
|
12-30-2013, 08:14 PM | #3 |
Guru
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
I'm no expert on the Calibre DB (in fact, I know bugger all...) however I imagine it serves two purposes. First I would assume that it ensures every folder name is unique. Second, I would imagine that the number corresponds to a numerical "book id" field in the database, making it very easy for calibre to search and find the appropriate file/folder.
Of course, I could also be completely wrong. *scurries off before being told he hasn't a clue what he's talkiing about* |
12-30-2013, 08:41 PM | #4 |
null operator (he/him)
Posts: 20,457
Karma: 26645808
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@Rootman - what sherman just wrote is right on the money But I might as well post what's already in the breech.
Essentially the numbers are the means via which calibre associates a row in its database (metadata.db) with a book folder. Because calibre permits duplicate books (same author, same title) it needs something unique to identify a book. And that's what the number is, its just a sequential number that's incremented whenever a book is added to a library. Internally its called the book-id, if you press I on a book you'll see it listed there. This is a very common technique in applications that use relational databases to ensure unique identification of rows in a table. And since the database wars of the 60/70's most databases are relational. When a book is saved to disk calibre doesn't need to write the book-id, because it's database does not keep track of those folders, they are yours to do with as you will. It could argued that calibre doesn't need the author or titles in folder and file names - it could just use the book-ids. But then it would have been a heck of lot harder for you to do do what you just did - sort out a messy library by hand and build a new library from scratch. BR Last edited by BetterRed; 12-30-2013 at 08:56 PM. Reason: spell/grammar |
12-30-2013, 08:43 PM | #5 |
Groupie
Posts: 181
Karma: 478
Join Date: Oct 2009
Device: Android & FBReader
|
That's what I thought.
Thanks for the answer guys! |
12-30-2013, 09:40 PM | #6 |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The number of the folder is what you get with the {id} template (this also matches a Key in the metadata.db for that BOOK)
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Appending Chapters? | Gene45 | Conversion | 11 | 11-19-2012 12:59 PM |
Calibre Temp folders, yet again | The QCC | Library Management | 27 | 05-05-2011 06:54 PM |
Appending from one field to another | Zifnab | Library Management | 5 | 04-28-2011 08:32 AM |
Getting Calibre To See Folders on IQ | MmavisO | Calibre | 6 | 12-19-2010 03:28 PM |
Instapaper folders and Calibre | flyash | Calibre | 4 | 08-13-2010 02:01 AM |