procmail
[Top] [All Lists]

Re: Recipe for converting HTML mails to...

1998-10-06 13:24:29
On 6 October 1998, Jari Aalto+list.procmail 
<jari(_dot_)aalto(_at_)poboxes(_dot_)com>
wrote:
|Mon 1998-10-05 Jacques Gauthier <jacques_g(_at_)yahoo(_dot_)com> 
list.procmail
| > lynx -dump is the best popular solution and a little more rough
| > solution is the perl onliner:
| 
| Would that be:
| 
| * H ?? (<HTML>)
| | lynx -dump | rest_of_treatement ?

I must have old lynx here, becasue it doesn't accept stdin, so I have
to save the content to a file before calling lynx. I'd choose the perl
one liner due to simpler recipe handling. (provided that accuracy is
not a concern).

Here is section that I just added to pm-tips.txt. Suggestions welcome.
[...]

    Not really related to what you need, but here's another trick for
lynx.  Normally, lynx can't take its input from stdin; however, it _can_
read it from a named pipe:

        mkfifo tmp.html
        lynx -dump tmp.html >file.txt &
        cat file.html >tmp.html

    Please note that both lynx and cat above will block, and that's the
reason why this doesn't apply directly to your recipe (and also why you
need to put lynx in background).

    Regards,

    Liviu

-- 
Dr. Liviu Daia                   e-mail:   daia(_at_)stoilow(_dot_)imar(_dot_)ro
Institute of Mathematics         web page: http://www.imar.ro/~daia
of the Romanian Academy          PGP key:  finger 
daia(_at_)stoilow(_dot_)imar(_dot_)ro

<Prev in Thread] Current Thread [Next in Thread>