Convert mht file under Linux

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
helion
Level 1
Level 1
Posts: 35
Joined: Sun Nov 12, 2017 9:02 am

Convert mht file under Linux

Post by helion » Sun Jan 07, 2018 2:26 pm

hello there,

i am looking for a way to convert old mht website archives under linux, so that they can be read by firefox.

in fact there existed plugins like unmht for conversions, but they are no longer compatible with ff 57 anymore.

User avatar
thx-1138
Level 7
Level 7
Posts: 1922
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Convert mht file under Linux

Post by thx-1138 » Sun Jan 07, 2018 2:52 pm

...an (admitedly really) quick googling revealed:
https://github.com/lsowen/mht-rip
&
http://www.volkerschatz.com/unix/uware/unmht.html
There also appear to exist online services that can do such, eg like:
https://www.coolutils.com/online/MHT-to-

Edit: Maybe also this one, gui-based:
https://sourceforge.net/projects/mht2ht ... r.2016%29/
Also , yet another idea would be to use a Firefox-clone that still has support for older plugins...

User avatar
Flemur
Level 17
Level 17
Posts: 7237
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Convert mht file under Linux

Post by Flemur » Sun Jan 07, 2018 3:26 pm

https://fileinfo.com/extension/mht
Programs that open MHT files
...
Linux :
Google Chrome
Opera
mht sounds like a zip file, so you might try opening it with the archive manager (file-roller or whatever) and see what happens, tho probably MS made it proprietary...
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 19.1 Xfce/fluxbox
Manjaro openbox/fluxbox

helion
Level 1
Level 1
Posts: 35
Joined: Sun Nov 12, 2017 9:02 am

Re: Convert mht file under Linux

Post by helion » Sun Jan 07, 2018 4:58 pm

@thx: thank you for the links.

searching is not the problem, but i hoped to get some rock solid recommendations :)

online converters is not my cup of tea, but the standalone tool looks interresting.

@flemur: thanks but i already tried to extract the files without luck.

does the repo offer a tool like this?

User avatar
phd21
Level 19
Level 19
Posts: 9319
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Convert mht file under Linux

Post by phd21 » Sun Jan 07, 2018 6:50 pm

Hi "helion",

1.) Have you tried opening them from within Firefox? Which Firefox are you using? It might ask you to convert them.
http://maf.mozdev.org/

2.) I read that Chrome and Waterfox can open them. Can you provide an mht file for us to try, or a link to download one to try?

3.) Save Page WE by DW-dev
"Please see the section near the bottom of this page for a description of how to convert Mozilla Archive Format and UnMHT files (.maff & .mht) into Save Page WE (.html) files."
https://addons.mozilla.org/en-US/firefo ... e-page-we/
CONVERSION OF MAF AND UnMHT FILES (.maff & .mht)

It is not possible for Save Page WE to do an automatic conversion of a Mozilla Archive Format (.maff or .mht) file or an UnMHT (.mht) file into a Save Page WE (.html) file. Firefox WebExtensions add-ons, such as Save Page WE, are not allowed to read local files.

It is recommended to convert .maff/.mht files as follows:

• Open the saved .maff/.mht file in Firefox.
• Re-save as .htm file (+ resources folder) using Firefox’s “Save Page As...” (Web Page, complete).
• Serve the saved .htm file (+ resources folder) through a local web server and open in Firefox.
• Re-save using Save Page WE.
? 4.) Chrome Store Foxified - Enables the Google Chrome Store and Opera Addons Website for Firefox. Point and click to install Opera/Chrome extensions straight into Firefox.
https://addons.mozilla.org/en-US/firefo ... -foxified/
Chrome extensions for mht
https://chrome.google.com/webstore/search/mht

I had to Accept the "Chrome Store Foxified" agreement in a new tab when adding the Chrome "Save MHT" extension, then go back to the tab for save MHT Chrome addon, click continue to add, and it added it to my Firefox!


Hope this helps ...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

helion
Level 1
Level 1
Posts: 35
Joined: Sun Nov 12, 2017 9:02 am

Re: Convert mht file under Linux

Post by helion » Mon Jan 08, 2018 12:16 pm

thank you all for your help.

ok, i tested mht2html and the conversion works quite good. you get a folder for each mht containing the extracted files. after that they can finally be opened in firefox 57 and saved to html with 'save page we'.

unfortunately, all pictures are lost and the procedure is rather cumbersome. therefore i am thinking of just leaving that step. a direct conversion to a single html file would be great, but finally i can open all conversions under linux alone.

User avatar
Spearmint2
Level 16
Level 16
Posts: 6826
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Convert mht file under Linux

Post by Spearmint2 » Mon Jan 08, 2018 3:27 pm

If it will open in Firefox, then can "print to pdf" and have it that way instead, or can save to "html" file and that will create an html file and supporting folder with all the other stuff in the folder.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

helion
Level 1
Level 1
Posts: 35
Joined: Sun Nov 12, 2017 9:02 am

Re: Convert mht file under Linux

Post by helion » Tue Jan 09, 2018 6:13 am

this is old mht files from opera or even explorer which wont open in firefox. that is why i need to convert them in first place.

User avatar
Spearmint2
Level 16
Level 16
Posts: 6826
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Convert mht file under Linux

Post by Spearmint2 » Tue Jan 09, 2018 1:05 pm

helion wrote:this is old mht files from opera or even explorer which wont open in firefox. that is why i need to convert them in first place.
That's why I never used mht files myself, always perfering to save in html format. If you install explorer or the opera program, you can open those mht files in it and then save them all as html files and then Firefox will use them. That's the easiest way out of the dilemma.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

Post Reply

Return to “Software & Applications”