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 05-16-2011, 07:30 AM   #1
ternyk
Member
ternyk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Slow calibredb add on huge ebooks directory

Hi,
I'm trying to import huge ebook collection (30GB) by a command line using calibredb.
The command I'm using is:
find . -type f| while read filename; do calibredb add -d -r --isbn "$filename%.*" "$filename"; done;
It's ok but veeery slow! After adding each of the files there is an output message:

0123456789 not found [my note: it's the isbn of the book]
Backing up metadata
Notifying calibre of the change

It seems that calibre is doing too much I want. I don't need backing up the database. Only just fast copying with adding the info to the databse. Is there any option to disable some internal processing when adding to the library?

(I've tried from GUI but it finished with error saying that the operation was aborted as it took too long - it was about 1 hour.)

Last edited by ternyk; 05-16-2011 at 07:36 AM. Reason: typo in the command line
ternyk is offline   Reply With Quote
Old 05-16-2011, 07:43 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
I do not think that message relates to backing up the database. I think it just means that after adding the book, the metadata.opf file has been created for that book (although I guess I could be wrong). Adding books is always a slow(ish) process as Calibre copies each file into its library as well as setting up entries in the metadata.db database. If you are reading metadata from the file it also has to open each file to extract its metadata.

One way that can speed up adding books (particularily for PDF files) is to disable reading the metadata from the file. However this may not be desireable as it means you later have to look at each book if you want to get its metadata set up.
itimpi is offline   Reply With Quote
Advert
Old 05-16-2011, 08:06 AM   #3
ternyk
Member
ternyk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Thanks. I see.
I think that I removed reading metadata last time I was using GUI. Can I disable reading metadata from the file from the command line parameter? I don't have access to the GUI now, just using ssh.
ternyk is offline   Reply With Quote
Old 05-16-2011, 10:00 AM   #4
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
I don't think you can, the manual notes no such option. You could try disabling the relevant metadata reader plugins in the GUI, but I don't know if that carries over to the CLI.
Manichean is offline   Reply With Quote
Old 05-16-2011, 10:53 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Manichean View Post
I don't think you can, the manual notes no such option. You could try disabling the relevant metadata reader plugins in the GUI, but I don't know if that carries over to the CLI.
It does. And you can disable plugins from the CLI using calibre-customize
kovidgoyal is offline   Reply With Quote
Advert
Old 05-16-2011, 11:07 AM   #6
ternyk
Member
ternyk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Quote:
Originally Posted by kovidgoyal View Post
It does. And you can disable plugins from the CLI using calibre-customize
Thanks, I've missed it.

I had the option for reading the metadata disabled.

Finally, importing has completed. Uff, it took nearly 8 hours to add 5000 documents.

But I forgot to mention, that it was working on the ntfs file system under Linux so it also had an impact on the overall process.
ternyk is offline   Reply With Quote
Old 05-16-2011, 11:09 AM   #7
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by kovidgoyal View Post
It does. And you can disable plugins from the CLI using calibre-customize
Good to know the CLI respects the plugin settings.
Manichean is offline   Reply With Quote
Old 05-17-2011, 02:52 AM   #8
ternyk
Member
ternyk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Last question: how can I download and update metadata & covers for the selected/all books but from command line?
It seems that I should combine: fetch-ebook-metadata with ebook-meta but maybe is there a simpler way?
ternyk is offline   Reply With Quote
Old 05-17-2011, 04:39 AM   #9
ternyk
Member
ternyk began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
OK. I've done it. In case someone will be looking for something similiar I'm putting the script.


#!/bin/sh

mkdir opf_tmp

while read id isbn ; do
echo "$id $isbn"
fetch-ebook-metadata -o OPF -i "$isbn" > ./opf_tmp/"$isbn"
calibredb set_metadata "$id" "./opf_tmp/$isbn"
done < <(calibredb list)
ternyk is offline   Reply With Quote
Reply

Tags
calibredb

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metadata during directory add? jdege Library Management 6 05-15-2011 01:02 PM
Calibredb add after ebook-convert fails spullar Calibre 5 03-04-2010 01:14 PM
I Can't add a directory takelu Calibre 2 02-05-2010 07:21 PM
Should Calibre take a long time to add a directory full of ebooks? jusmee Calibre 4 10-25-2009 10:34 PM
What format to use for huge HTML directory -> iPhone? Robotech_Master Workshop 6 12-22-2008 04:59 PM


All times are GMT -4. The time now is 10:44 AM.


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