visidata icon indicating copy to clipboard operation
visidata copied to clipboard

[eml] Add an alias for mhtml file type that maps to eml

Open frosencrantz opened this issue 10 months ago • 0 comments

The mhtml file format appears to be the same as eml. See wikipedia, and try it on example files found on GitHub.

The main comment from https://en.wikipedia.org/wiki/MHTML:

The .mhtml (Web archive) and .eml (email) filename extensions are interchangeable: either filename extension can be changed from one to the other.

Searching GitHub for sample mhtml files https://github.com/search?q=path%3A%2F%5C.mhtml%24%2F&type=code , I found: https://github.com/testimio/mhtml-parser/tree/master/demos Ex:

  • https://raw.githubusercontent.com/testimio/mhtml-parser/master/demos/github.node.mhtml
  • https://raw.githubusercontent.com/linux-on-ibm-z/docs/cecbdb80f0b7017f10af214574ccf40452088470/index.mhtml

Trying to open these files appears broken, even if I try just to use x command to extract a file, it has errors.

vd -z -f eml https://raw.githubusercontent.com/testimio/mhtml-parser/master/demos/wikipedia.mhtml

This does not require a new command, so the following items are N/A

If you want to propose a command, please include:

  • [X] N/A what should the helpstring say
  • [X] N/A where should this command go in the menu system

This FR originally came from https://github.com/saulpw/visidata/issues/2312

frosencrantz avatar Apr 09 '24 17:04 frosencrantz