MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Calibre (https://www.mobileread.com/forums/forumdisplay.php?f=166)
-   -   Command line : adding books to the main library (https://www.mobileread.com/forums/showthread.php?t=313865)

Bertrand 12-30-2018 06:12 AM

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.

kovidgoyal 12-30-2018 10:17 AM

you want

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

that is the library path should before add not after

Bertrand 12-30-2018 12:36 PM

Ah ! Thanks Kovid, working much better now !


All times are GMT -4. The time now is 09:38 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.