Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-30-2018, 05:12 AM   #1
Bertrand
Zealot
Bertrand began at the beginning.
 
Posts: 124
Karma: 10
Join Date: Dec 2008
Location: France
Device: None
Command line : adding books to the main library

Hi all

I add books in calibre with a batch file. It works well but I have a small glitch.

In the GUI, I have 2 libraries, let's say A (main library) and B.
Despite the fact that the main library is mentionned in the batch file, the books are always added to the last library I opened in the GUI.
If B was the last one, then they are added to B.
If A was the last one, then they are added to A (which is ok).

Not a big deal, when it happens, I just copy (and delete) from B to A, but I'd like to understand what's wrong with my code.

Here is a snippet of my batch file :
Code:
set source=D:\Epubs
:: Main library
set library=C:\Calibre
calibre-debug -s
calibredb add -d --library-path %library% %source%
The doc doesn't mention --library-path as a parameter for the add command, I think I found this somewhere in the forum.
Bertrand is offline   Reply With Quote
Old 12-30-2018, 09:17 AM   #2
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: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you want

calibredb --library-path=xxx add ...

that is the library path should before add not after
kovidgoyal is offline   Reply With Quote
Advert
Old 12-30-2018, 11:36 AM   #3
Bertrand
Zealot
Bertrand began at the beginning.
 
Posts: 124
Karma: 10
Join Date: Dec 2008
Location: France
Device: None
Ah ! Thanks Kovid, working much better now !
Bertrand is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding custom fields when importing books via command line chemi Library Management 7 02-25-2013 10:16 PM
Adding books from command line chemi Library Management 3 02-25-2013 11:28 AM
Adding book from command line bdillahu Calibre 3 01-24-2012 11:19 AM
adding books via command line in msdos batch FlaKate Calibre 1 12-25-2009 01:12 AM
Adding books from the command line edembowski Calibre 1 08-29-2009 11:18 AM


All times are GMT -4. The time now is 05:39 PM.


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