|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
|
How can I force Calibre to add formats that are added manually to the respective f?
Hi
I created a script that converts pdf files to djvu files and copies them to their respective folders. It is all fine but is there a way to get Calibre to ad those dangling files to the proper book database ? The djvu files are in the same folder as the original pdf files. thanks |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
|
@kovidgoyal
Thanks for the pointers. looked at the available possiblities and it might work out however I think I am missing one crucial information. I need a way to pass an id to calibredb and get the actual path of the book. It is a bit convoluted to me. I have djvu files named exactly same as the pdf except that it has a djvu extension. So in this respect do you have a recommendation for me to go for as far as the scripting logic goes? thanks |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The ids are part of the folder names, you can easily parse them out from there.
|
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
And you can use
calibredb list -f formats --for-machine --search=id:book_id to get the path of all ebook files for a book in JSON format given the book id Last edited by kovidgoyal; 06-01-2015 at 02:23 AM. |
![]() |
![]() |
![]() |
#8 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
|
thanks for your help, I guess I have to move to Python from Bash to wrap this up.
|
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#10 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
|
|
![]() |
![]() |
![]() |
#11 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,720
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#12 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
|
Quote:
Here is a djvu "The artistic anatomy of trees, their struc - Cole, Rex Vicat, b. 1870.djvu" and the pdf "The artistic anatomy of trees, their struc - Cole, Rex Vicat, b. 1870.pdf" I was thinking that maybe the regex was failing but I did the test and the regex in the add settings seems to catch stuff properly based on the example above. Calibre has the exact records for it based on the regex splitting. Peculiar. Btw the reason I am going for Djvu because scanned Pdfs are painfully slow and I find Djvu to be much faster format both on mobile and desktop. Last edited by loviedovie; 06-01-2015 at 08:41 PM. |
|
![]() |
![]() |
![]() |
#13 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,720
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
If there aren't too many you could just open each book folder - press 'O' - then drag 'n' drop the djvu file onto the book details. I do it every day with a dozen or so PRC files converted from PDF's with mobi creator. BR |
|
![]() |
![]() |
![]() |
#14 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 295
Karma: 2139988
Join Date: Nov 2014
Device: bookeen
|
BetterRed
Thanks for the suggestions. I have 375 Djvu files and more will be on the way later. I also used the same regex as the one you gave. I wonder if this has more of an issue with the Caibre's djvu format treatment. |
![]() |
![]() |
![]() |
#15 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,720
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
But I suspect the problem is that the file name contains 'truncated' titles as in - "The artistic anatomy of trees, their struc" whereas the title in the metadata is presumably "The artistic anatomy of trees, their structure & treatment in painting". I'm not sure what constitutes a 'duplicate' in the Add process. What happens if the title & author are not truncated in the file name, e.g - "Some Title - Some Author.djvu" BR |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Manually tweak date (& time?) added? | Snorkledorf | Library Management | 1 | 04-09-2014 09:37 AM |
Manually add a TOC entry | p3aul | Sigil | 4 | 06-13-2012 08:22 AM |
Manually adding different formats of a book | murali | Calibre | 4 | 12-02-2010 02:17 PM |
Force Calibre not to add Page Breaks on H1 and H2 Tags | jloakes | Calibre | 2 | 11-18-2010 04:08 PM |
How can I add multiple formats (without converting) and have Calibre see them? | strannik | Calibre | 4 | 02-03-2010 05:49 PM |