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

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 02-26-2014, 10:33 AM   #1
Saint Aardvark
Junior Member
Saint Aardvark began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2013
Device: Kobo Touch
How to script conversion of HTML, not RSS?

Hi all -- apologies if this is answered somewhere else, but I haven't been able to find anything that seems to do what I want.

I'm interested in using Calibre recipes to convert HTML to epub, ideally from a command-line (I'm a Linux weenie from way back ). From what I've seen by digging around in the API documents and the recipes, this seems quite different from the usual approach of pointing Calibre at an RSS feed. Often I come across an article on a website I'd like to read later on my Kobo, so I'd like to have some way of saying "Go fetch this URL".

So far I've been scripting this using wget for the downloading, then some truly awful sed scripts to get the relevant bits of HTML, and finally passing that to "ebook-convert". Of course, this would be a whole lot easier with a recipe: parsing, removing cruft, and all of that.

Like I said, it seems that Calibre is (as far as news feeds go) quite oriented around RSS. Is there a way around this, or something I may have missed? Any pointers would be gratefully received.
Saint Aardvark is offline   Reply With Quote
Old 02-26-2014, 11:15 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,435
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Many calibre recipes parse html files to get a list of articles, rather than using rss. See the parse_index() method. Implement it to return a lsit of articles that contains onlya single article, poiting to your html page.
kovidgoyal is offline   Reply With Quote
 
Advertisement
Old 02-28-2014, 10:54 AM   #3
Saint Aardvark
Junior Member
Saint Aardvark began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2013
Device: Kobo Touch
I'll check that out. Many thanks!
Saint Aardvark 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
html to epub CLI conversion / html input m4mmon Conversion 2 05-05-2012 03:10 AM
Script to convert all system installed Man Pages to HTML rogerx Conversion 1 08-26-2011 09:12 AM
Problem with html -> Mobi conversion - html tags visible. khromov Calibre 9 08-06-2011 12:25 PM
conversion script JeffElkins Calibre 2 03-28-2009 04:06 AM
prs-gen.pl :: Batch RSS->PDF Script hrbrmstr Sony Reader 1 10-28-2006 12:53 PM


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


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