![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Preferred formats in calibredb export
I use calibredb export to create a flat copy of all my books in a Cloud location. I don't want to export all formats, only one format of each book. Some books come in PDFs, some in ePUBS, some in both.
With the --formats option I can restrict to say, only PDFs only, but then I won't get the books which are ePUBs only and vice versa. So how can I tell calibredb export to use the ePUB if it exits, but other formats, if an ePUB cannot be found? I'm thinking of something like Preferred formats... My current way is to export all formats and then delete the duplicate formats via a script. - Not particularly efficient... |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In your script first query the database to find what formats are available for the book, then export it accordingly
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Thanks for the reply!
So I have query calibredb for each book individually? First get all book IDs, then query each for the formats, then export that format for this book? - This will be a lot of calibredb calls... Or don't I understand this correctly? |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,146
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibredb list -f formats
calibredb export calibredb export |
![]() |
![]() |
![]() |
Tags |
calibredb, formats |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibredb export | phossler | Library Management | 18 | 07-18-2015 07:15 PM |
CalibreDB Export Progress Indication?? | phossler | Calibre | 2 | 01-26-2015 09:02 PM |
calibredb not acknowledging 'preferred input order' | sconnolly | Library Management | 1 | 06-04-2012 12:12 AM |
Preferred Input Formats | Ken Stuart | Calibre | 4 | 01-02-2011 01:34 PM |
Jetbook preferred formats | Lanx | Ectaco jetBook | 9 | 06-16-2009 10:47 AM |