Skip to content

gildas-lormeau/mhtml-to-html

Repository files navigation

MHTML-TO-HTML

JavaScript library and application for converting MHTML files to single HTML files

Download

chmod +x mhtml-to-html

Usage

mhtml-to-html <input>... [--output <output>] [--help] [--enable-scripts] [--fetch-missing-resources] [--version]

 Arguments:
  <input>: The input MHTML file, wildcards are supported
 Options:
  --output <output>: The output HTML file (default: input file with .html extension), only used when a single 
                     input file is provided
  --help: Show this help message
  --enable-scripts: Enable scripts (default: disabled)
  --fetch-missing-resources: Fetch missing resources (default: disabled)
  --version: Show the version number

Examples

 mhtml-to-html file.mht
 mhtml-to-html file1.mht file2.mht
 mhtml-to-html file.mht --output output_file.html
 mhtml-to-html *.mht
 mhtml-to-html *.mht *.mhtml
 mhtml-to-html *.mht --enable-scripts

Convert MHTML Files Online

Go to https://gildas-lormeau.github.io/mhtml-to-html.html

Install

  • Node.js:
npm install mhtml-to-html
  • Deno:
deno add jsr:@mhtml-to-html/mhtml-to-html

Install from Source

git clone https://github.com/gildas-lormeau/mhtml-to-html.git
  • Deno:

    • Install Deno, see https://deno.com

    • Make mhtml-to-html executable (Linux, Unix)

    chmod +x mhtml-to-html
  • Node.js:

    npm install
    • Linux, Unix:

      • Replace mhtml-to-html with mhtml-to-html-node.js
      mv mhtml-to-html-node.js mhtml-to-html
      • Make mhtml-to-html executable
      chmod +x mhtml-to-html
    • Windows:

      • Replace mhtml-to-html.bat with mhtml-to-html-node.bat
      move /Y mhtml-to-html-node.bat mhtml-to-html.bat