09-08-2010, 05:35 AM | #1 |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Calibre on ubuntu server
I currently have a minimal ubuntu server sharing all my media files etc. I would like to do a similar thing for e books using calibre.
I've found instructions on here on how to daemonize calibre, which is fairly simple - but as I have no GUI on my server how can I configure it? Ideally I would like it to download news on schedule and email them to my kindle, as the normal calibre can do on ubuntu. Is this possible, if so how can I set it up? I've searched on here and had a look at the command line interface in the manual and can't see how it can be done. If it is possible, it would be excellent - automated delivery of the news every morning TIA Last edited by tdw197; 09-08-2010 at 05:35 AM. Reason: Sp |
09-08-2010, 06:17 AM | #2 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Have a look at this thread. I believe it solves your problem.
|
Advert | |
|
09-08-2010, 06:20 AM | #3 | |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Quote:
|
|
09-08-2010, 06:37 AM | #4 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Well, I'm not using *nix, so I can't help you as to where to put the cronjob. But, in a nutshell it's as easy as getting the correct incantation of epub-convert: Say you want to download the NY Times. You'd then have a look in the recipes (found in resources/recipes in the Calibre root) and find the corresponding recipe to be called nytimes.recipe, so you'd get your command to invoke as
Code:
ebook-convert <calibreroot>/resources/recipes/nytimes.recipe todays_nytimes.mobi As for emailing said MOBI-file to your Kindle, there should be console programs on a Linux system that can do exactly that, but you'd have to wait for one of the Linux gurus to arrive for an answer. I'd like to point out, though, that, if you have the Kindle with WiFi, you should also be able to add the MOBI file to your calibre library and download it via the content server. |
09-08-2010, 06:44 AM | #5 | |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Quote:
I'm fine with the cron job, I have a few running already, and you have explained excellent how to download th recipe and convert automatically. I have had a look at the manual and there seems to be a command called smtp which should help with emailing the created file. I guess i could include this in the cron job to email to my kindle, but the command looks complicated! I know running calibre as a daemon, will allow me to download the created file, but I like a bit of a challenge and automating it completely is definitely one... - edit, running calibre as a daemon and running a command to convert, and hopefully email, won't cause issues? There will be no calibre GUI, other than the content server. |
|
Advert | |
|
09-08-2010, 06:48 AM | #6 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
|
09-08-2010, 06:50 AM | #7 |
Wizard
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
You will not be running the main calibre program as a daemon - merely the command-line calibre program to carry out the speciffied task.
|
09-08-2010, 06:53 AM | #8 | |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Quote:
I envisage, if poss, using the command line to download convert and email the recipe. But, in addition, having the content server running 24/7 to enable donwloading of books to my iPhone or kindle. Is this poss? And can anyone explain how to use the smtp command? Cheers |
|
09-08-2010, 06:55 AM | #9 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
|
09-08-2010, 04:58 PM | #10 |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
right got this sorted!
Wrote a script to download the recipe, convert to mobi and email to my kindle email address - all works well so far (if anyone is interested let me know and i'll post it on here). However, I think there may be a problem... The script will create and replace the same file everyday and email it out. Will the file be delivered to the kindle again, or will it assume it has already be delivered the previous day (as it has the same name) and ignore it? |
09-08-2010, 05:10 PM | #11 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
It shouldn't be hard to script up a naming scheme to change the name each time the file is created. FYI, the recipe->ebook step does not automatically put the ebook into the Calibre library. If you want it there, you'll need to automate that part, too. |
|
09-08-2010, 05:12 PM | #12 | |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Quote:
Just looking at how to manage the calibre library on a server, is the best way to use the calibre interface on a local machine, but pointing at the library etc accross the network? |
|
09-08-2010, 05:35 PM | #13 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Calibre isn't client/server, so you need to have only one machine access your library at a time. As long as you meet that requirement, there are many ways to set things up. How did you plan to do it?
|
09-08-2010, 05:37 PM | #14 | |
Member
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Quote:
However, just been looking at calibredb commands.... keep failing on 'startswith' error, if i get this sorted though i think this will be the way forward. |
|
09-20-2010, 05:38 PM | #15 |
Enthusiast
Posts: 45
Karma: 220
Join Date: Jul 2010
Device: none
|
I am trying this with the SF Chronicle. It works fine on my machine running the complete calibre GUI. Running from the command-line on ubuntu my server that doesn't run X, I eventually get a bunch of invalid CSS errors -- many along these lines: Property: Invalid value for "CSS Level 2.1" property: 1 [1:15: width] -- and then when creating the mobi file, it gives me this:
Creating MOBI Output... 67% Creating MOBI Output Generating in-line TOC... Applying case-transforming CSS... Traceback (most recent call last): File "/usr/bin/ebook-convert", line 19, in <module> sys.exit(main()) File "/usr/lib/calibre/calibre/ebooks/conversion/cli.py", line 254, in main plumber.run() File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 886, in run self.opts, self.log) File "/usr/lib/calibre/calibre/ebooks/mobi/output.py", line 166, in convert rasterizer = SVGRasterizer() File "/usr/lib/calibre/calibre/ebooks/oeb/transforms/rasterize.py", line 34, in __init__ raise Exception('Not OK to use Qt') Exception: Not OK to use Qt At this point it craps out and doesn't create the file. Anyway, what does this mean? Last edited by kingduct; 09-20-2010 at 05:39 PM. Reason: Forgot to mention it fails to create the file |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Daemonizing the calibre-server in Ubuntu | gkbeer | Calibre | 10 | 01-20-2013 01:24 PM |
Calibre crashes X server (Ubuntu 10.10) | mfabry | Calibre | 9 | 10-15-2010 05:12 PM |
Calibre Content Server error in Ubuntu 10.10 | Bodman456 | Calibre | 1 | 07-07-2010 04:26 PM |
Calibre RuntimeError on Ubuntu 8.04 Server | alexbt | Calibre | 3 | 10-13-2009 05:26 AM |
Problems installing Version: 0.4.109 on Ubuntu Server 8.10 | machalla | Calibre | 0 | 12-03-2008 10:23 PM |