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.