View Single Post
Old 02-26-2014, 09: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