| 
			
			 | 
		#1 | 
| 
			
			
			
			 Member 
			
			![]() 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 01:46 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Member 
			
			![]() 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 03:59 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Member 
			
			![]() 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!  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 15 
				Karma: 10 
				Join Date: Jul 2017 
				
				
				
				Device: iPad 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			PS: does Calibre "clean up" (erase/move) the files in the import folder?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | |
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 If you mean the folder selected fro "Add Book": NO You need to implement the disposition after the Add  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Arch Linux content server (500 internal error) | Joosca77 | Devices | 11 | 07-16-2015 12:07 AM | 
| Linux Content Server/Wireless Connection advice please | darryl | Devices | 7 | 09-27-2014 08:28 AM | 
| Content Server as service under Linux | Lofwyr23 | Calibre | 2 | 01-12-2014 01:45 PM | 
| Calibre content server on linux error | vil_coyotte | Calibre | 2 | 11-02-2012 09:56 AM | 
| Auto Import Books on headless Server | tymanthius | Related Tools | 2 | 05-05-2012 01:33 AM |