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 07-24-2017, 12:42 PM   #1
maddhin
Member
maddhin began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jul 2017
Device: iPad
Content-server: Auto-import on Linux?

Hi,

I imagine having a sync folder on my PC where I export books to from my local Calibre library. That folder is then automatically synced with a folder on my Pi and books are then automatically imported into the library on the Pi (with only the calibre-server running and files in sync folder automatically erased after successful import).

Possible or a dream?

That would actually be an awesome method to feed a server without the need of direct access and, say, editing the remote library remotely (and firing up calibre).

Last edited by maddhin; 07-24-2017 at 12:46 PM.
maddhin is offline   Reply With Quote
Old 07-24-2017, 01:06 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)
Sure, but you don't need to jump through so many hoops.

You'd be importing them through `calibredb add`, which requires you either stop the server, or use --with-library=http://127.0.0.1#mainlibrary at which point you can simply use calibredb directly from your PC.

Alternatively, you could sync your actual library folder with the rpi while the server is stopped.
eschwartz is offline   Reply With Quote
Advert
Old 07-28-2017, 02:57 AM   #3
maddhin
Member
maddhin began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jul 2017
Device: iPad
Thanks, eschwartz - I'm currently using your second option but in a "dirty" way = I'm live syncing the actual library onto the RPI with the server running... That works "well" (until it doesn't...)

So, I want to have a workflow which is as "lazy" but safe. So, having a dedicated "books to import" (Sync) folder and - say - a (crontab) script which (shuts down the server) and imports the books from there every hour or so seems to be a good method.

Naturally, if one would just give the server an import folder and the server would check that folder every few minutes and auto-imports would be ideal but I guess that IS too much to ask

I could also run a script as you mentioned from my laptop for the import but in terms of workflow I'd prefer an "automatic" solution. I'm using a number of different computers, etc so keeping a script up to date w/ different IPs etc seem tedious

Thanks a bunch for your help!

Last edited by maddhin; 07-28-2017 at 02:59 AM.
maddhin is offline   Reply With Quote
Old 08-02-2017, 11:07 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)
And I will reiterate, that crontab job can run from on the laptop or from on the RPI server. Either way it will need to use --with-library=http://localhost:8080/#mylibrary or --with-library=http://rpi.localdomain/#mylibrary which means you might as well do it on the laptop.
eschwartz is offline   Reply With Quote
Old 08-08-2017, 07:54 AM   #5
maddhin
Member
maddhin began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jul 2017
Device: iPad
Sorry, I'm asking all the stupid questions but I'm not very familiar with this and do not want to kill my library

So I would add something like this into crontab and have it run regularly?:

calibredb add --one-book-per-directory --with-library=home/pi/library home/pi/folder-with-exported-ebooks

Does anybody know how much CPU/RAM this action uses? I'd schedule it to run every 30min for convenience reasons but if it needs ressources, I'd run it like twice a day haha

Thanks a lot for the help!
maddhin is offline   Reply With Quote
Advert
Old 08-08-2017, 08:03 AM   #6
maddhin
Member
maddhin began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jul 2017
Device: iPad
PS: does Calibre "clean up" (erase/move) the files in the import folder?
maddhin is offline   Reply With Quote
Old 08-08-2017, 09:34 AM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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
Quote:
Originally Posted by maddhin View Post
PS: does Calibre "clean up" (erase/move) the files in the import folder?
If you mean the designated 'Auto-Import" folder: mostly, Yes.The file must be accepted for import (excluded and not book types will remain).

If you mean the folder selected fro "Add Book": NO
You need to implement the disposition after the Add
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arch Linux content server (500 internal error) Joosca77 Devices 11 07-15-2015 11:07 PM
Linux Content Server/Wireless Connection advice please darryl Devices 7 09-27-2014 07:28 AM
Content Server as service under Linux Lofwyr23 Calibre 2 01-12-2014 12:45 PM
Calibre content server on linux error vil_coyotte Calibre 2 11-02-2012 08:56 AM
Auto Import Books on headless Server tymanthius Related Tools 2 05-05-2012 12:33 AM


All times are GMT -4. The time now is 04:00 AM.


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