Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-18-2010, 02:16 AM   #1
nkormanik
Connoisseur
nkormanik began at the beginning.
 
nkormanik's Avatar
 
Posts: 86
Karma: 10
Join Date: Oct 2010
Location: Philippines
Device: DavidAcisAAJ
Command Line Batch Adding of Epubs

When trying to add many ebooks from the GUI, Calibre crashes. So, I'm wanting to add ebooks by way of the command line, preferably one at a time, for stability.

I created a batch file as follows, however only the first line gets accomplished, but nothing after that -- the batch file simply quits after the first line:

calibredb add -d 101.epub
calibredb add -d 102.epub
calibredb add -d 103.epub
calibredb add -d 104.epub
calibredb add -d 105.epub

Would someone please suggest a way of using the command line to bring in many hundreds of ebooks??

Thank you,
Nicholas Kormanik
nkormanik is offline   Reply With Quote
Old 10-18-2010, 02:32 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: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by nkormanik View Post
I created a batch file as follows, however only the first line gets accomplished, but nothing after that -- the batch file simply quits after the first line:
Try preceding each line by the start command.

Quote:
Originally Posted by kovidgoyal View Post
on xp, vista you have to use start in batch files if you are executing multiple calibre programs, I have absolutely no idea why.
I'm not sure if just the first program needs to be preceded by the start command or each program in the batch file.

start calibredb add -d 101.epub
start calibredb add -d 102.epub
start calibredb add -d 103.epub
start calibredb add -d 104.epub
start calibredb add -d 105.epub

Last edited by DoctorOhh; 10-18-2010 at 02:36 AM.
DoctorOhh is offline   Reply With Quote
Advert
Old 10-18-2010, 07:59 AM   #3
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 believe that there can be some strange interactions between the Windows command line processor and Calibre. The effect is that the batch file tends (as you found) to get abandoned after executing a calibre command. Using the Start option to run the commands should get around this although you might want to also use the /wait option as well on each line after the Start keyword to make sure each one runs to completion before the next one is started.

Alternative Windows command processors seem to not suffer from this issue so it is not clear why the default Windows one does.
itimpi is offline   Reply With Quote
Old 10-18-2010, 11:01 AM   #4
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,227
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
You can put "CALL " in front of each calibre instance. It works for me.
Terisa de morgan is offline   Reply With Quote
Old 10-18-2010, 11:45 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dwanthny View Post
Try preceding each line by the start command.

I'm not sure if just the first program needs to be preceded by the start command or each program in the batch file.

start calibredb add -d 101.epub
You probably want start /wait calibredb add -d 101.epub
chaley is offline   Reply With Quote
Advert
Old 10-19-2010, 01:15 AM   #6
nkormanik
Connoisseur
nkormanik began at the beginning.
 
nkormanik's Avatar
 
Posts: 86
Karma: 10
Join Date: Oct 2010
Location: Philippines
Device: DavidAcisAAJ
Thanks all for your help.

I decided to convert first, through the command line. The ONLY batch approach I tried that worked is as follows:

start /wait ebook-convert.exe 00001.epub 00001c.epub
start /wait ebook-convert.exe 00002.epub 00002c.epub
start /wait ebook-convert.exe 00003.epub 00003c.epub
start /wait ebook-convert.exe 00004.epub 00004c.epub
start /wait ebook-convert.exe 00005.epub 00005c.epub
nkormanik is offline   Reply With Quote
Old 10-19-2010, 08:04 AM   #7
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by nkormanik View Post
Thanks all for your help.

I decided to convert first, through the command line. The ONLY batch approach I tried that worked is
As others have posted, using start /wait in front of each command is the approach that has been tested and works.
Starson17 is offline   Reply With Quote
Reply

Tags
bulk import, command line


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Why use the command line? slantybard Calibre 6 07-22-2009 12:17 PM
Crash while batch converting epubs under windows AprilHare Calibre 3 04-26-2009 03:46 AM
Errors on Command Line drnkusv Calibre 11 11-07-2008 02:59 PM


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


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