mhonarc-users

RE: multipart emails (with HTML) translation to single text/plain 8bit

2001-06-15 12:41:29
Thanks a lot Earl for your very good suggestion !
2 last questions :

- how can I do in order to be able to display mhonarc output as a standard
email :

From:
To:
Subject:
Date:

<BODY>

Do I need to parse mhonarc output or is there a way to configure mhonarc to
do that directly ? Of course, when I say mhonarc output, I mean in reality
HTML->text output but since it depends on mhonarc output...

- anybody has a HTML->text translator to suggest instead of lynx in order to
take input from stdin ?

Thanks in advance for your help.                        Gildas.

-----Message d'origine-----
De : owner-mhonarc(_at_)ncsa(_dot_)uiuc(_dot_)edu 
[mailto:owner-mhonarc(_at_)ncsa(_dot_)uiuc(_dot_)edu]De
la part de Earl Hood
Envoyé : lundi 11 juin 2001 17:54
À : mhonarc(_at_)ncsa(_dot_)uiuc(_dot_)edu
Objet : Re: multipart emails (with HTML) translation to single
text/plain 8bit


On June 11, 2001 at 14:58, "Gildas PERROT" wrote:

I would like to translate multipart email to a single
text/plain 8bit file
since those emails will be processed by an application which
needs that type
of format. Is it possible to do that with Mhonarc and how ? Or
is it better
to do that with another translator ?

MHonArc is oriented to converting to HTML, but the code base could
accommodate conversion to other formats.

A simple approach is to have MHonArc convert the message to HTML then
call a program that can dump HTML to text.  For example:

  shell> mhonarc -single message.822 > message.html
  shell> lynx -force_html -dump message.html > message.txt

It would be better if the HTML->text translator can take input from
stdin so you can just pipe output from mhonarc to it, but if not,
something like the above can be encapsulated in a script.

Note, you will probably want to specify a resource file to mhonarc
that excludes data that cannot be converted straight to HTML/text
(e.g. image/*, video/*, application/*, ...).  This will also avoid
the creation of files representing attachments.

--ewh