Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 06:21 AM   #1
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 254
Karma: 356710
Join Date: Jan 2016
Location: France
Device: none
Question [SOLVED][CLI] Adding all EPUBs from given directory?

Hello,

This is my first try at adding books to Calibre through the command line… and neither works:

Code:
"C:\Program Files\Calibre2\calibredb.exe" --add .\*.epub
"C:\Program Files\Calibre2\calibredb.exe" add .\*.epub
Also, can the CLI then be used to upload those books to the Kobo currently connected, so that I never have to bother with the GUI?

Thank you.

Last edited by Shohreh; Yesterday at 07:16 AM.
Shohreh is offline   Reply With Quote
Old Yesterday, 06:54 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,866
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
You have to use the GUI to send books to your Kobo. And since you have to use the GUI to send books to your Kobo, you may as well use the GUI to add books.

If you don't use the GUI, you'll nver know if there are any errors in the metadatda.
JSWolf is online now   Reply With Quote
Old Yesterday, 07:15 AM   #3
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 254
Karma: 356710
Join Date: Jan 2016
Location: France
Device: none
Too bad. Thank you.

I might wipe up my own script to keep track of books and copy the files to the Kobo :-)
Shohreh is offline   Reply With Quote
Old Yesterday, 08:39 AM   #4
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,384
Karma: 1589505
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by JSWolf View Post
You have to use the GUI to send books to your Kobo. And since you have to use the GUI to send books to your Kobo, you may as well use the GUI to add books.

If you don't use the GUI, you'll nver know if there are any errors in the metadatda.
That's incorrect.

Quote:
Originally Posted by Shohreh View Post
Hello,

This is my first try at adding books to Calibre through the command line… and neither works:

Code:
"C:\Program Files\Calibre2\calibredb.exe" --add .\*.epub
"C:\Program Files\Calibre2\calibredb.exe" add .\*.epub
Also, can the CLI then be used to upload those books to the Kobo currently connected, so that I never have to bother with the GUI?

Thank you.
1) Check the help for options for using calibredb do add books from a directory (calibredb add -h). But, if it is a single directory with books in it, just run:
Code:
calibredb add "path/to/your/local/folder" "path/to/device/destination/folder"
In case you open the terminal from that directory, you can run:
Code:
calibredb add ./
2) To send books to your device, you need to use ebook-device cp. It's not documented in the Manual, but you can find help in the terminal as usual (ebook-device cp -h).

3) If you need to send books from the library, you must first export (calibredb export) them to a temporary folder, then send to your device (ebook-device cp). You can write a script to run it with a single click, if you use this often.

Last edited by thiago.eec; Yesterday at 08:41 AM.
thiago.eec is offline   Reply With Quote
Old Yesterday, 11:30 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,866
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
That (IMHO) is way too complicated. It's much easier to use the GUI.
JSWolf is online now   Reply With Quote
Old Yesterday, 03:04 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 54,392
Karma: 182161789
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Once you have stepped through it once and created a script to perform the actions, it simply becomes a matter of launching the script.
DNSB is offline   Reply With Quote
Old Yesterday, 05:57 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 22,827
Karma: 34252730
Join Date: Mar 2012
Location: Sydney Australia
Device: none
What's the point of adding ebooks to a calibre library**, which is what the calibredb add command does, if you never use the calibre library manager - i.e. the "GUI"?

** - a folder with a metadata.db sqlite database with a calibre specific schema, a hidden .calnote subfolder, a hidden .caltrash subfolder… and a hierarchical author/book subfolder structure. The hidden folders are not empty, they contain fixed name subfolders and the one for notes contains another calibre specific sqlite database.

How does one create a calibre library, as defined above, other than via the calibre library manager (GUI) Choose library→Switch/create library action?


BR

Last edited by BetterRed; Yesterday at 06:39 PM.
BetterRed is offline   Reply With Quote
Old Today, 03:29 AM   #8
Shohreh
Addict
Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.Shohreh ought to be getting tired of karma fortunes by now.
 
Posts: 254
Karma: 356710
Join Date: Jan 2016
Location: France
Device: none
It's getting complicated.

Can an expert summarize the CLI commands to…
1. export *.EPUB from a given directory to Calibre's DB
2. export documents from Calibre's DB to Kobo
3. list+search documents from Calibre's DB so I can find if I ever read that document
?
Shohreh is offline   Reply With Quote
Old Today, 05:47 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,866
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by BetterRed View Post
What's the point of adding ebooks to a calibre library**, which is what the calibredb add command does, if you never use the calibre library manager - i.e. the "GUI"?

** - a folder with a metadata.db sqlite database with a calibre specific schema, a hidden .calnote subfolder, a hidden .caltrash subfolder… and a hierarchical author/book subfolder structure. The hidden folders are not empty, they contain fixed name subfolders and the one for notes contains another calibre specific sqlite database.

How does one create a calibre library, as defined above, other than via the calibre library manager (GUI) Choose library→Switch/create library action?


BR
I agree. It's not a good idea to just use CLI commands. or one thing, you cannot see if the metadata needs editing before the books are sent to the Reader.
JSWolf is online now   Reply With Quote
Old Today, 05:48 AM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,866
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Shohreh View Post
It's getting complicated.

Can an expert summarize the CLI commands to…
1. export *.EPUB from a given directory to Calibre's DB
2. export documents from Calibre's DB to Kobo
3. list+search documents from Calibre's DB so I can find if I ever read that document
?
Using the GUI is much easier. You won't have to jump through so many hoops to do something that's easy to do with the GUI.

Wha is it you have against the GUI?
JSWolf is online now   Reply With Quote
Old Today, 06:01 AM   #11
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 15,702
Karma: 250801379
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by JSWolf View Post
Using the GUI is much easier. You won't have to jump through so many hoops to do something that's easy to do with the GUI.

Wha is it you have against the GUI?
Probably the same objections that many people have expressed: calibre has too many features they don't use and that makes the GUI too bloated for them. Also some folks want to keep their own folder/directory system, and that pretty much rules out calibre as a library management tool.

I agree that using the GUI for automatic tracking is much easier than fiddling with command line tools, but those who hate the calibre GUI presumably don't share this viewpoint.
Sirtel is online now   Reply With Quote
Old Today, 06:10 AM   #12
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 15,702
Karma: 250801379
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by JSWolf View Post
For one thing, you cannot see if the metadata needs editing before the books are sent to the Reader.
You do know that there are people out there who have absolutely no wish to bother with editing metadata, right? They load a book, read it, delete it, and that's pretty much all they want to do.

Of course, if they also want to start tracking their reading, that does make things more complicated. On one hand, they don't want to mess with library management, but on the other hand they want to know what they've read, and that means there has to be some management, like it or not...

Of course there are alternatives to calibre, like Goodreads, Storygraph or just a plain Excel sheet. All those mostly require manual management, though.
Sirtel is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre issues with adding books using cli klackerz Calibre 1 07-06-2018 06:06 AM
Adding books on cli leads to error johnny_cgn Calibre 11 06-26-2018 04:12 AM
Adding Author Links Programmatically through cli or the api klackerz Calibre 2 06-20-2017 05:05 AM
Adding online metadata using ISBN from CLI EditorJack Calibre 17 01-20-2009 01:47 AM


All times are GMT -4. The time now is 06:34 AM.


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