10-12-2012, 08:41 PM | #1 |
Member
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: none
|
deleting corrupted directories
I had a Calibre Library that was corrupted during copying of that library when I ran out of filespace on the receiving flash drive. Calibre reports that the library is ok when running a check library, but with many of the 'books' now listed, the ebook format is no longer present in the directory, only the cover.jpg and metadata file. Unfortunately, with a 4000+ "book" library, I don't want to go through the listing one at a time and deleting those that don't have an ebook present. I am running Calibre 0.9.2 on Ubuntu 12.04. Is there a script that can be used to delete all the authors/book directories that don't have an ebook file present within them?
An example sample library is attached. It has two "books" listed, one being renamed "Example of Good Directory" and the other "Example of Bad Directory." The 'good example' has a pdf files listed, but it's actually a 2 byte text file renamed pdf so that the filesize is significantly smaller than the original. The covers have been scaled down to 100x120 or so. Running the library maintenance on this reports no errors. Thank you. Maybe in future versions the Library Maintenance can be changed to check if a "book" actually exists in the directory, and then gives an option to delete that book if not present. Last edited by jebradley; 10-12-2012 at 08:48 PM. Reason: Forgot to add the attachment. |
10-12-2012, 08:48 PM | #2 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Advert | |
|
10-12-2012, 10:25 PM | #3 |
Member
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: none
|
Take a look at the library that I attached to my message.
When you run the 'Library Maintenance->Check Library' you get the message "Found no errors in your calibre library database. ..." When I checked 'Yes,' I got the message "The files in your library match the information in the database." After reading theduck's post, I re-ran things and got an error in the second phase about the author being incorrect, and after deleting the only thing that I could check, it again states that there are no errors in the first phase, and the second phase states that the information matches. The second book, "Example of a Bad Book Directory" is still present, and does not contain a document file, only the metadata and cover.jpg. |
10-12-2012, 10:43 PM | #4 |
null operator (he/him)
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
If you click on Formats in the Tag Browser a couple of times until its a red Minus sign you should see all the books with no valid book file (EPUB, MOB, TXT etc) - ie folders with just an OPF and maybe a cover file.
See piccie BR |
10-12-2012, 11:20 PM | #5 |
Member
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: none
|
The sample library that I posted has no files listed when the red Minus sign is present, yet if you look at the title, "Example of a Bad Book Directory", you will see that the information lists Authors, Tags, and Path. There is NO ebook format listed.
Last edited by jebradley; 10-12-2012 at 11:21 PM. Reason: Should have said library rather than directory |
Advert | |
|
10-13-2012, 12:00 AM | #6 |
Member
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: none
|
To BetterRed
The tag browser, when + lists all the 'books' that you have entered tag information. When -, it lists all the files that have no tag information listed. It doesn't have anything to do with whether a document file is present. |
10-13-2012, 12:20 AM | #7 |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
What you describe is an 'Empty Book' (metadata only). IMHO useful to keep track of books belonging to a series, but not owned. Public Library books that have been read (and the book checked back in )
This is a 100% valid condition, which is why the maintenance did not flag it. If someone HAD gone into the file system and deleted the format, the error would be flagged (Calibre keeps track of formats stored) as MISSING. |
10-13-2012, 01:36 AM | #8 |
Member
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: none
|
Well, unfortunately, my library was corrupted during a failed copy/erase when the receiving thumb drive was full. It was not due to turning in a library book. And, my library of 4886 document titles is too many to go one by one to see if there is a document present.
This discussion did get me looking at the various information tabs available. I did a search of formats:"=EPUB" or formats:"=PDF" or formats: ... for all the document types, and then highlighted all of the titles displayed. I'm doing a copy/erase to another directory. If things work as I expect, I should be left with only those titles that have no document within their directory. I can then delete these. This is much faster than going file by file. I suspect this is going to work, but there are quite a few files being transferred. So we'll wait and see. It would be nice, if under the formats tab, that a no formats present tab was present. |
10-13-2012, 03:36 AM | #9 | |
null operator (he/him)
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Hence a search of formats:false (which is what the Red Minus on the Formats Tag equates to) will show all 'books' that don't have any known book format files. But I suspect I've misunderstood your problem, sorry about that BR |
|
10-13-2012, 04:57 AM | #10 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
If you want to find book entries that have no associated ebook format then you can search using
Code:
formats:false As was mentioned many people (myself included) use book entries with no attached ebook format for purposes such as wish list entries and tracking paper/audio books so there is no way Calibre should ever not allow this scenario. |
10-13-2012, 07:21 AM | #11 | |
Well trained by Cats
Posts: 29,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
If you want those all GONE. Search: formats:false Select all (results) Tap the Delete key |
|
10-13-2012, 04:23 PM | #12 |
Member
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: none
|
Thank you.
The 'formats:false' was the key that i needed. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
double directories | sar026@gmail.com | Calibre | 2 | 10-02-2012 07:47 AM |
Directories and book import | JulioQc | Library Management | 3 | 05-02-2012 12:36 PM |
PRS-600 Can somebody explain the directories? | Cue | Sony Reader | 5 | 01-19-2012 07:31 AM |
Default Directories | goldberry | Library Management | 8 | 04-10-2011 12:56 PM |
Classic Nooklibrary : Allows Directories management? | Kolfe | Barnes & Noble NOOK | 3 | 11-08-2010 09:00 AM |