![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Onyx Boox
|
Add epub from recipe to content server
Hey, apologies if this is the wrong area.
I have calibre running headless on an ubunto pi. I'm trying to collect a reading daily using a recipe and add the epub to the database, overwriting yesterday's version so that I can open my reader in the morning and just have it be there automagically. I'm running the following using crontab 0 9 */1 * * ebook-convert calibre-recipes/daily-reading.recipe calibre-library/daily-reading.epub This recipe is successful. That is, it runs and exits with this output: EPUB output written to /home/lucas/calibre-library/daily-reading.epub Output saved to /home/lucas/calibre-library/daily-reading.epub Next, I want to add this epub (5 minutes later by the crontab schedule) 5 9 */1 * * calibredb add calibre-library/daily-reading.epub --with-library 192.168.86.29 --username XYZ--password ABC --automerge overwrite Runs successfully, exits with: Merged book ids: 1 Perfect, I assume. Except that nothing happened. The book isn't in my library. In the calibre-library directory I can still see > ls calibre-library .... 'Cronbach, Lee J_' CSA 'C. S. Lewis' daily-reading.epub 'Daniel Kahneman' 'David Deutsch' .... and using "calibredb --with-library calibre-library list --fields title" to check the db shows no new entries. So the first part worked, and the calibredb add is doing something but I don't know what... Anyone with a clue to what I'm missing? I feel like I must of misread the documentation somewhere. Last edited by ljfriese; 10-28-2021 at 03:21 PM. |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Onyx Boox
|
To late for edits, but other notes:
calibredb check_library --with-library calibre-library
Shows that the daily-reading.epub file doesn't have a valid author. This makes sense because the receipe doesn't collect the author, just title. calibredb --with-library calibre-library search daily Yields nothing. "Daily" should be in the book title. However, running calibre db add without --automerge overwrite indicates that it IS there: calibredb add calibre-library/daily-reading.epub --with-library 192.168.86.29:8080 --username XYZ --password ABC The following books were not added as they already exist in the database (see --duplicates option or --automerge option): Daily Readings [Thu, 28 Oct 2021] /home/lucas/calibre-library/daily-reading.epub So the db seems to have a phantom version, or something, and it's not surfacing in the server. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Dont put the downloaded file in your library folder. Put it somewhere else then add it.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Onyx Boox
|
Fair, I should have tried that, but it gave the same result.
I created a new folder for the recipe download and running the calibredb add resulted in a success ("Added book ids: 3"), but the book is still not in my library. And I have no idea why the add is resulting in 3 book ids, because there is only one book... |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
3 is the id of the added book. and you have probably added it to a different library than the one you think you have added it to.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Onyx Boox
|
Struggling to edit....
Scratch that last one. Looking at my directories properly made me realize I had done a bunch of dense things while trying to work this out. Cleaned it up, and using your suggestion I'm now getting the file I want in the library.
Thank you. The book only surfaced in my server after restarting the server - Is there any way to get around that? It's not a problem, but I want to make sure I'm doing things right. |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Onyx Boox
|
You are correct. I followed up with a response that is still waiting on the moderator. That response also has a follow-up question asking about how to not have to restart the server. The answer is to do the --with-library argument correctly.
For posterity and future googlers: calibredb add daily-reading/daily-reading.epub --with-library http://50.92.227.145:8080/#calibre-library --username XYZ--password ABC --automerge overwrite Thanks for your help. This really is an awesome piece of software. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Best device for accessing Calibre as a content server only / Best way to add content | yelt | Calibre | 1 | 10-01-2020 09:53 PM |
calibredb cannot add with content server running | apiontek | Calibre | 10 | 08-04-2017 04:50 AM |
Calibre Content Server 3.0 - add fields to be displayed | daz-uk | Calibre | 14 | 07-07-2017 07:20 PM |
Add Content Server as a library ? | akmeltem | Library Management | 1 | 06-25-2017 08:46 AM |
Could you please add PDF support for the content server? | tdk987 | Calibre | 0 | 08-01-2010 06:34 AM |