using lynx to dump formatted content (was: command line fan fiction program?)

Tim Chase blinux.list at thechases.com
Thu Mar 23 18:30:55 UTC 2017


On March 23, 2017, Chime Hart wrote:
> Now an inquiree for Tim? You mentioned useing wget as a
> screen scraper? Would that be the best tool for simulating a
> printer friendly page, to get rid of any toolbars-and-links, to
> just endup with what you may remember as a Gopher rendering of an
> article?

Lynx has a "-dump" command-line option (which is effectively the same
as the "p"rint command when issued within a running instance of lynx).

It does provide a "printer friendly" sort of view of the page
by rendering the text as Lynx would do interactively.  However,
it doesn't strip away the toolbars and other cruft. It does put a
footnote-like number beside each link and then puts all of the linked
URLs at the bottom of the document which is nice for printing.  With
enough constancy in the page layout, these could be stripped by
post-processing through sed.

> If you-and-Karen prefer, we could begin a new thread under
> a new subject-line?

I've gone ahead and changed the Subject line.

-tim





More information about the Blinux-list mailing list