[svlug] Convert HTML to txt

Steve Litt slitt at troubleshooters.com
Fri Aug 15 01:08:20 PDT 2014


On Thu, 14 Aug 2014 21:44:30 -0700
Scott DuBois <sdubois at linux.com> wrote:

> On 08/13/2014 11:23 PM, Rick Moen wrote:

> > Thus, likewise a classic 'scripted option'.
> > 
> 
> elinks -dump http://www.roguehorse.com/ > rhcom.txt
> 
> Huh, well I'll be damned, would ya look at that. Hmmm, makes me wonder
> what the script would be for then? I guess for someone with really
> limited space I suppose that didn't want to install a text browser or
> as a piece of some other program.

To get a wordcount when writing a web page (yeah, I still do it in
static HTML, so shoot me), I often do this:

lynx -dump /my/path/mypage.html | wc -w

Of course, there's still some extra fluff that isn't really content,
but it's a good indication, especially if you're comparing today's
wordcount to yesterday's.

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance





More information about the svlug mailing list