Article 55JFZ [Mutt] save HTML-Mail in a raw text file

[Mutt] save HTML-Mail in a raw text file

by
Michael Uplawski
from LinuxQuestions.org on (#55JFZ)
Good evening

Let me try to keep this simple. First I tell you what I want, then I tell you what I did and describe the results which, so far, are unsatisfactory. Chances are, you do not understand me anyway... PSE stick to what I note in my subject-line, above: Mutt. This is my mail-client which I use in a terminal-emulator.

What I want
I receive HTML-mail and there is a newsletter in HTML that I am particularly interested in. I attach the latest issue to this post with headers and all (be brave, if you want to read the source). This type of mail is displayed in mutt with the help of the w3m text-browser. Here is a screen-shot.

What I dream of is a way to store a readable text-version of such mail in a file.
What I did
For the time I tried to pipe the mail through commands, directly from mutt (using the pipe symbol '|') or to convert either the eml-file or only the html-content with html2text or a2ps and ps-filters (which are ghostscript, if I have understood anything).

The result is always awful.

I do clearly not know, what I am doing.

While w3m and mutt are a perfect match and display something halfway readable, my attempts appear to fail due to the Content-Transfer-Encoding quoted-printable. I can understand that html2text is not interested in quoted-printable and a2ps will transform what it gets, all encoding and tags intact.

The best that I can come up with is the output from my own tool maillinks", which extracts links (hidden ones, especially) from html-mail and references complete URLs below the text. I used html2text on this result and put it in the attachment maillinks-output.
If you know something better
PSE tell me. But remember : this is about Mutt.
Attached Thumbnailsattachment.php?attachmentid=33621&stc=1& Attached Files
txt.gifgmfmail.eml.txt (110.2 KB)
txt.gifmaillinks_output.txt (31.1 KB)
latest?d=yIl2AUoC8zA latest?i=xipVAHnyLVg:ppSjqsFP8QM:F7zBnMy latest?i=xipVAHnyLVg:ppSjqsFP8QM:V_sGLiP latest?d=qj6IDK7rITs latest?i=xipVAHnyLVg:ppSjqsFP8QM:gIN9vFwxipVAHnyLVg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments