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 11-26-2014, 01:32 PM   #1
perler
Enthusiast
perler began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jul 2010
Device: perler
calibredb add - exclude formats?

is there a way to exclude certain formats from imported by

Code:
calibredb add..
?

and is there a way to convert a book while importing via a command line switch?
perler is offline   Reply With Quote
Old 11-26-2014, 02:24 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
On linux/OSX, you'd use something like:

Code:
for i in *.FMT1 *.FMT2 *.FMT3; do
	calibredb add $i
done
Or:

Code:
for i in *.FMT1 *.FMT2 *.FMT3; do
	ebook-convert $i /tmp/$(basename $i).END_FMT
	calibredb add /tmp/$(basename $i).END_FMT
done

Last edited by eschwartz; 11-26-2014 at 02:29 PM.
eschwartz is offline   Reply With Quote
Advert
Old 11-26-2014, 02:28 PM   #3
perler
Enthusiast
perler began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jul 2010
Device: perler
this way I would need to write my own loop to search thru subdirectories, I hoped, that I can use a switch together with

calibredb add ---r $path
perler is offline   Reply With Quote
Old 11-26-2014, 02:53 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
We can use "find" as well, which should recurse automatically.

Code:
find . -type f \( -name "*.FMT1" -or -name "*.FMT2" \) -exec calibredb add {} \;
And awesomely enough, gfind (renamed) can do this on Windows too, with https://github.com/bmatzelle/gow

(On Windows, the characters ;() do not get escaped.)

Last edited by eschwartz; 11-26-2014 at 03:25 PM.
eschwartz is offline   Reply With Quote
Old 11-26-2014, 03:13 PM   #5
perler
Enthusiast
perler began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Jul 2010
Device: perler
followed by \;

thanks
perler is offline   Reply With Quote
Advert
Old 11-26-2014, 03:21 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Correct.

Fixed.

Last edited by eschwartz; 11-26-2014 at 03:23 PM.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibredb add problem jmwatte Calibre 6 10-17-2014 02:30 AM
calibredb add metadata issue vir_db Library Management 0 07-21-2014 07:12 AM
cannot add book to calibredb using CLI bump Calibre 2 04-04-2014 01:33 AM
calibredb add --title= not working krischik Library Management 2 04-06-2012 02:57 AM
calibredb add -- how to add additional metadata? TuxGirl Calibre 16 12-29-2011 01:01 AM


All times are GMT -4. The time now is 06:15 PM.


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