Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-08-2010, 04:35 AM   #1
tdw197
Member
tdw197 began at the beginning.
 
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 04:35 AM. Reason: Sp
tdw197 is offline   Reply With Quote
Old 09-08-2010, 05:17 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
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.
Manichean is offline   Reply With Quote
Advert
Old 09-08-2010, 05:20 AM   #3
tdw197
Member
tdw197 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by Manichean View Post
Have a look at this thread. I believe it solves your problem.
I did see that thread, but being a bit of a newb wasn't sure how to customise the code and whether it would email out the downloaded rss feed - is suspect it won't?
tdw197 is offline   Reply With Quote
Old 09-08-2010, 05:37 AM   #4
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
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
which should create a file called todays_nytimes.mobi containing, well, the NY Times articles as of the time you called the command. (<calibreroot> needs to be filled out to be the place the calibre directory resides in your system, see above comment about not using a *nix OS.)
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.
Manichean is offline   Reply With Quote
Old 09-08-2010, 05:44 AM   #5
tdw197
Member
tdw197 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by Manichean View Post
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
which should create a file called todays_nytimes.mobi containing, well, the NY Times articles as of the time you called the command. (<calibreroot> needs to be filled out to be the place the calibre directory resides in your system, see above comment about not using a *nix OS.)
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.
Thanks for the help.

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.
tdw197 is offline   Reply With Quote
Advert
Old 09-08-2010, 05:48 AM   #6
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by tdw197 View Post
- 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.
Not as far as I know. Though you shouldn't need the content server for downloading recipes.
Manichean is offline   Reply With Quote
Old 09-08-2010, 05:50 AM   #7
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
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.
itimpi is offline   Reply With Quote
Old 09-08-2010, 05:53 AM   #8
tdw197
Member
tdw197 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by itimpi View Post
You will not be running the main calibre program as a daemon - merely the command-line calibre program to carry out the speciffied task.
Thanks to the both the above.

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
tdw197 is offline   Reply With Quote
Old 09-08-2010, 05:55 AM   #9
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by tdw197 View Post
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.
That should work.
Manichean is offline   Reply With Quote
Old 09-08-2010, 03:58 PM   #10
tdw197
Member
tdw197 began at the beginning.
 
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?
tdw197 is offline   Reply With Quote
Old 09-08-2010, 04:10 PM   #11
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by tdw197 View Post
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?
That's a Kindle question, so you'll have to get it answered by a Kindle expert (or just try it)

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.
Starson17 is offline   Reply With Quote
Old 09-08-2010, 04:12 PM   #12
tdw197
Member
tdw197 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by Starson17 View Post
That's a Kindle question, so you'll have to get it answered by a Kindle expert (or just try it)

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.
Yeah, thanks just ran the script twice (takes a while on my net-top!) and it gets delivered twice, so no probs there.

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?
tdw197 is offline   Reply With Quote
Old 09-08-2010, 04:35 PM   #13
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by tdw197 View Post
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?
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?
Starson17 is offline   Reply With Quote
Old 09-08-2010, 04:37 PM   #14
tdw197
Member
tdw197 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
Quote:
Originally Posted by Starson17 View Post
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?
was thinking on stopping the daemon and then modifying/adding accross the network from my laptop.

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.
tdw197 is offline   Reply With Quote
Old 09-20-2010, 04:38 PM   #15
kingduct
Enthusiast
kingduct doesn't litterkingduct doesn't litterkingduct doesn't litter
 
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 04:39 PM. Reason: Forgot to mention it fails to create the file
kingduct is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Daemonizing the calibre-server in Ubuntu gkbeer Calibre 10 01-20-2013 12:24 PM
Calibre crashes X server (Ubuntu 10.10) mfabry Calibre 9 10-15-2010 04:12 PM
Calibre Content Server error in Ubuntu 10.10 Bodman456 Calibre 1 07-07-2010 03:26 PM
Calibre RuntimeError on Ubuntu 8.04 Server alexbt Calibre 3 10-13-2009 04:26 AM
Problems installing Version: 0.4.109 on Ubuntu Server 8.10 machalla Calibre 0 12-03-2008 09:23 PM


All times are GMT -4. The time now is 09:32 PM.


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