[Baypiggies] HTML to printable file
akkana at shallowsky.com
Fri Mar 30 17:06:36 CEST 2012
Tony Cappellini writes:
> While that will work for the current page, I should have mentioned I'm
> looking for a program that should be
> able to follow urls several levels (the level of urls will be determined by
> the user).
It's fairly easy to convert HTML pages to PDF with Python QtWebView
and QPrinter (you don't have to be running KDE or set up a GUI). I've
never found a way to do the same using python-webkit (the GTK bindings).
I'm sure the webkit API will let you get a list of links and follow
them, though I don't know the calls offhand. Or you could get them
with a grep of the original page, and run your print script on the
list of URLs (as I do there).
More information about the Baypiggies