Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-05-2011, 05:02 AM   #1
Giuseppe Chillem
Zealot
Giuseppe Chillem doesn't litterGiuseppe Chillem doesn't litter
 
Giuseppe Chillem's Avatar
 
Posts: 135
Karma: 134
Join Date: May 2010
Device: IREX DR1000
How do I import this library ?

Hello,
I have just downloaded a library of books which has this structure

Author Name\book name\file.mobi
Author Name\book name\cover.jpeg
Author Name\book name\metadata.opf

It has been created from a Calibre Library

Is there a way to add it to the calibre library folder and let calibre update his database ?

Thanks in advance
Giuseppe Chillem is offline   Reply With Quote
Old 01-05-2011, 05:16 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,772
Karma: 12516053
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by Giuseppe Chillem View Post
Hello,
I have just downloaded a library of books which has this structure

Author Name\book name\file.mobi
Author Name\book name\cover.jpeg
Author Name\book name\metadata.opf
You may find that it has a metadata.db file too. If it does just switch to this location and see what you have in the library. If you want to you can copy from this library to your current library.

Alternatively you could just add the entire directory of books to your collection using the add books from directories feature (see attached). If you do this you might want to have these two settings checked, see attached.
Attached Thumbnails
Click image for larger version

Name:	add books.jpg
Views:	192
Size:	137.4 KB
ID:	64126   Click image for larger version

Name:	adding books preferences.jpg
Views:	199
Size:	73.7 KB
ID:	64127  
DoctorOhh is offline   Reply With Quote
Old 01-05-2011, 07:07 AM   #3
Giuseppe Chillem
Zealot
Giuseppe Chillem doesn't litterGiuseppe Chillem doesn't litter
 
Giuseppe Chillem's Avatar
 
Posts: 135
Karma: 134
Join Date: May 2010
Device: IREX DR1000
Quote:
Originally Posted by dwanthny View Post
You may find that it has a metadata.db file too. If it does just switch to this location and see what you have in the library. If you want to you can copy from this library to your current library.

Alternatively you could just add the entire directory of books to your collection using the add books from directories feature (see attached). If you do this you might want to have these two settings checked, see attached.
Found the metadata.db and the copy library feature.

Everything seems working.

Thanks
Giuseppe Chillem is offline   Reply With Quote
Old 01-21-2011, 06:39 AM   #4
Mixx
Zealot
Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.
 
Posts: 138
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
Can I please reopen this thread? In my case, regrettably, there is no *.db file. I just have a bunch of author_title.zip files with

book.html
book.jpg
book.opl
book.txt
mbp_toc.html

for each book, but put into a subdirectory called "title" in the ZIP file. When I import the ZIP file, the metadata are read properly, the cover is not loaded though and the format of the book is "ZIP". But when I try to read it or convert it, I get an error :TypeError: Invalid input object: NoneType.

Any help appreciated.

Mixx
Mixx is offline   Reply With Quote
Old 01-21-2011, 07:54 AM   #5
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by Mixx View Post
Can I please reopen this thread? In my case, regrettably, there is no *.db file. I just have a bunch of author_title.zip files with

book.html
book.jpg
book.opl
book.txt
mbp_toc.html

for each book, but put into a subdirectory called "title" in the ZIP file. When I import the ZIP file, the metadata are read properly, the cover is not loaded though and the format of the book is "ZIP". But when I try to read it or convert it, I get an error :TypeError: Invalid input object: NoneType
Try unzipping all the files, each file into it's own subdirectory (7zip allows that for multiple ZIPs with one click, don't know about other programs). Then, in Calibre, in the add books dropdown, select the option "subdirectories, one book per directory, multiple formats". If I'm not much mistaken, that ought to do it.
Manichean is offline   Reply With Quote
Old 01-21-2011, 08:23 AM   #6
Mixx
Zealot
Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.
 
Posts: 138
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
Thanks, Manichean, for your suggestion.

In that case the metadata are read correctly again except for the Title (which is: "mbp toc" in each case), the cover is not read. There are two files in the entry: one TXT (with the small excerpt in the *.txt file), one ZIP, which can be displayed or converted, but it contains only (the correct) table of contents, with links (but these point to NIL).

Regards, Mixx
Mixx is offline   Reply With Quote
Old 01-21-2011, 09:14 AM   #7
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
First off, do you read metadata from file name or from file content (see preferences->adding books)? (I just realized that I confused OPL with OPF, I was thinking about Calibre reading the metadata from the OPF.)
What I find somewhat confusing is that you get only the TOC inside the ZIP file (Calibre zips up anything it thinks belongs to a HTML book, so the ZIP file part is expected behaviour), does the mbp_toc.html point to entries inside book.html? If not, what does it point to?
Manichean is offline   Reply With Quote
Old 01-21-2011, 09:56 AM   #8
Mixx
Zealot
Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.
 
Posts: 138
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
Hi Manichean,

I read metadata from file content. And indeed, the ZIP file (cervantes.zip) contains these files:

Quote:
META-INF
container.xml
content.opf
mbp_toc.html
mimetype

mbp_toc.html is small and contains only the TOC. The link all point into a TEMP directory of Windows c:\Users\MyID\AppData\Local\Temp\_tc\ in which an html file is created,

file:///C:/Users/MyName/AppData/Local/Temp/_tc/E%3A%5CBooks%5CE-Book%5Cdon_quijote%5Cdon_quijote.html#mbp_toc_9

Thus, the book itself is not there but one can see the title (Don Quijote) in the path above.

Thanks for your help,

Mixx

PS: container.xml is in subdir Meta-Inf
Mixx is offline   Reply With Quote
Old 01-21-2011, 10:15 AM   #9
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Hm. I'm not entirely sure, but that file structure reminds me of the contents of an ePub file. Also, I'm somewhat confused, earlier you said the contents of the ZIP files were different?
Try renaming the files that have the content and structure as described in your last post to .epub and adding that file to Calibre.
Manichean is offline   Reply With Quote
Old 01-21-2011, 11:36 AM   #10
Mixx
Zealot
Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.
 
Posts: 138
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
Appreciate your patience, Manichean!

The contents *are* different, but the file name of that one file "mbp_toc.html" is the same in all of them. When I just import any of the ZIP files, it pops up identical for each file.

I renamed the ZIP file into EPUB, as you suggested. I can import it all right, but the metadata are not read correctly. The file type is EPUB now, which I can not read with the built-in reader, but a conversion into MOBI is possible after which the file can be read.

With that I have a half-half situation: either I get the metadata right or the book, but not both. I'll see if I can import twice and merge.

The trouble is, even if that works, I'll still have to add the cover manually (grr) and will not have TOC (which is generated but the links point to nirvana).

Is there a way maybe, that I could produce "proper" epub files, since we are *this* close to them anyway?

Thanxx, Mixx
Mixx is offline   Reply With Quote
Old 01-21-2011, 11:39 AM   #11
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by Mixx View Post
I renamed the ZIP file into EPUB, as you suggested. I can import it all right, but the metadata are not read correctly. The file type is EPUB now, which I can not read with the built-in reader, but a conversion into MOBI is possible after which the file can be read.

With that I have a half-half situation: either I get the metadata right or the book, but not both. I'll see if I can import twice and merge.
I guess I was wrong then and those files are not falsely labelled ePub. Would've been too easy anyway.
Best solution I can think of right now is importing them as ePub anyway, since you said you were able to convert those files. Do an ePub->ePub conversion, that ought to give you valid files. Read the metadata from file name instead of file content while importing, and before converting, do a bulk metadata edit reading the cover from the file. That should get you nice metadata and readable books with the least amount of work, I believe.
Hint: Try this on a subset before committing all books
Manichean is offline   Reply With Quote
Old 02-01-2011, 05:10 PM   #12
Mixx
Zealot
Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.Mixx has a complete set of Star Wars action figures.
 
Posts: 138
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
Well, just to close this thread (or at least my part of it):

I ended up deleting the files

book.txt
mbp_toc.html

after which I could read the whole library, except for the book.jpg files (=covers).

book.txt is irrelevant and is not being referenced by the other files. mbp_toc.html is the table of contents and is being referenced in the main (book.html) file in the folder. This was apparently the problem, calibre can not include those files somehow, even though there is an explicit reference by filename in the main html file.

For me, mission accomplished, it is just that I have all those covers in the folders and I can not seem to find a way to read them together with the other files in the folder.

If I might, I'd like to suggest this as an improvement: a book.jpg file in the same folder as book.opf and book.html should be read together with the others and applied as the cover image. That would be handy in some cases.

Many thanks to Manichean for his help.

Thanxx, Mixx
Mixx is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] import library or export to single file add to existing library PCreighton Calibre 4 04-10-2011 01:08 AM
Export book from library and import on other computer? Guido Henkel Calibre 4 12-24-2010 07:29 AM
Import My Library many folders. VinceG Calibre 2 12-09-2010 08:35 AM
Trying to import books from Sony ebook Library Anny Calibre 3 03-30-2009 02:33 PM
Ebook Library Import Andybaby Calibre 5 12-28-2008 09:22 PM


All times are GMT -4. The time now is 12:01 AM.


MobileRead.com is a privately owned, operated and funded community.