mht2htm

(Test version)

Usage: mht2htmcl[.exe] [-h] [[-a<0-4>] [-v<1-3>] [-s:]<sourcefile> [-o:<output dir>]]

You can help to mht2htm become better.

You can translate mht2htm to your language. There is form TRANSLATION with every version with strings needed to translate. Help also need to be translated.

You can compile mht2htm for one system I can't. I can only do that for windows and Linux and there is Lazarus versions for almost any system.

You can test mht2htm to other unlisted versions of Windows, Linux, BSD ... and tell me if it works or not.

You can tell me if you find mht mht2htm can't convert (don't send it to me, mail me address and program version which created mht).

You can report bug.

And, finally, you can mail me what you think that can be improved.

Thanks,
Goran Atanasijevic
<This email address is being protected from spambots. You need JavaScript enabled to view it.>
1.7.7.x 19.dec.2012

Win32 on Windows XP 32-bit.
Linux i386 on SuSE 12.2 i386 and x86_64 with 32-bit support (all desktop systems)
Linux x86_64 on SuSE 12.2 x86_64 (all desktop systems)


Older versions
 
v 1.5.0.7. [BETA]
v 1.5.0.10. [BETA]
v 1.6.0.3. [BETA]
 
Win32
GTK
GTK2
Win32
GTK
GTK2
Win32
GTK
GTK2
Win XP
OK
/
/
OK
/
/
OK
/
/
Open SuSE 10.2
 (all window managers)
/
OK
OK,
 bug [1]
/
OK
OK,
 bug [1]
OK
OK
OK
Ubuntu 5.10 Live
 (32-bit, Gnome)
/
?
?
/
-
OK,
 bug [1]
?
-
OK
Knoppix 3.2(KDE)
/
?
?
/
OK
-
?
OK
bug [2]
Knoppix 3.7(KDE)
/
?
?
/
-
OK
OK
-
OK
Knoppix 5.1.1(KDE)
 
 
 
 
 
 
OK
-
OK
Kubuntu 7.04
 (i32,KDE) Live CD
 
 
 
 
 
 
?
-
OK
SuSE 9.2 Live CD
 
 
 
 
 
 
?
-
OK
 
 
 
 
 
 
 
 
 
 
bug [1] on Gnome only. Works fine if you do not need address correction set to zero.
bug [2] program works, but crashs when OpenFileDialog is called.

/ wrong OS
? not tested
- don't work

Help.

mht2htm have only one form and it looks like this

mht2htm form

Main part of form is table filled with mht files you want to convert (big, light yellow field). Table is empty on this picture.

Table have tree column: file name, file size and file dir.

Below this table is one row with buttons.
Below buttons there are field where you can enter output dir, button to select (same) output dir and check box if you want to "use same directory as mht file" is in.
Below that are addresses to mht2htm home site, my e-mail address and Lazarus home page address.

commands

Commands:
Add .mht files - will open OpenFileDialog characteristic for OS you are running program at. This dialogs looks different from OS to OS but all have same purpose. Select file(s) you want to add to list and click on OK. You can make multiple selection. And you can add more files, not necessarily from same dir.

NEW! Add folder - will show SelectFolder dialog. After choose directory you will be asked for mask.

commands

Some standard predefined masks as *.mht, *.eml and *.* are offered in dropdown list.

commands

All files from this folder and all subfolders, if they match mask, will be added in list.

Remove from list - will remove only one file, selected one from list.

Start -  will start conversion.  Program is always converting file first in the list. After file is converted it will be removed from list and next file will become first.

commands

When conversion is in progress some button will be disabled.
Form on this picture is in different color because it is from different platform. Don't worry. That's all same.

Stop - Start button is replaced with Stop button. When conversion of last file ends button Start will be back. If you press Stop button mht2htm will finish conversation of started file and then will stop. After that you can press Start again to process rest of files.

Let's see what we have on right side of form.

commands

We have two progress bars, each with own text above.
First shows number of finished (converted) mht files out of all mht files.
Second shows number of files inside current mht file and how many of them are extracted.
Note that this do not show real progress (measured in time) because there can be larger and smaller mht files and they are not necessary equally distributed within file list.

Below is Estimated time (on picture there is error, should be Estimated time instead of first Options).
First row  shows elapsed time and second shows how much is left. Estimation is not exact.

komande

Options (real ones) have tree values:
Level of address correcting - can be changed with slider. 4 is best and recommended, but is also slowest. 0 means no address correcting. Extracted files will be same as they were on server. Values between (1,2 and 3) have better speed but at cost of less methods of address searching. (This program do not analyze any of files. It will try to guess addresses :-) ).

Details level - low, medium or high and represent how much detailed informations will be written in __start_me.htm file.

Create mega.nfo file - if checked program will create mega.nfo file in SAME DIR WHERE PROGRAM IS. Don't use it if you don't have right to write to that dir. In this file are stored all files with original addresses (from net), local filename and dir, file type. One file - one row. Field delimiter is [:-:]. This is created as link with other programs.

When create mega.nfo is checked and translation is started there will not be button Stop, but Pause instead.

commands

When you press Pause button mht2htm will finish conversation of started file and then will stop. Pause will then be replaced with Continue button.

commands

So, what is difference between Stop and Pause? Pause shows only when create mega.nfo is checked and will continue to write in same file. Start will recreate mega.nfo and erase whatever was in file.
When last file is converted Pause will become Start.

Flag - and language name shows language used in form and in output files. Left or right mouse button over this area will bring pop-up menu with all available languages.

language menu

Select preferable language and everything will be translated.
If there is no language you prefer then you can help me. There is TRANSLATION file zipped with mht2htm. It is text file with form. You only need to enter translated words and sentences (about 80 of them). Then mail it to me and I'll include it in next version.

History - will replace list of files waiting to be converted (yellow one) with list of already converted files (light blue)

history

History will be replaced with Back button.
Back - button brings back list of mht files (yellow)
In history list you can select one by one and with right mouse button call pop-up menu. Manu offer you to open htm file, or to open mht file (have sense only on win, and only if you want to compare source and result), or you can open destination directory. Directory will be opened in common file browser. Also you can Close History (same as Back) and select web browser you want to open htm files with (Linux only, for win only default browser is available - for now).

You can change to history list and open converted htm files during conversion, but that will be little slow because mht2htm is taking most of available processor time.

Of course, you don't need this to open converted files, you can open htm files from directory they are saved in. Directory can be either Output dir entered or selected, or same directory as mht file if checkbox is checked. Empty Output dir field have same effect as if "same dir" is checked .

For mht file examplemhtfilename.mht will be created directory examplemhtfilename.mht_Files and all files will be extracted inside.
Directory  examplemhtfilename.mht_Files MUST NOT EXIST.  When konversion of examplemhtfilename.mht starts and there is examplemhtfilename.mht_Files directory program will stop. This is not bug, I don't want to owerwrite something. Delete all directories like this before you press Start.

There will be two additional files in output dir. First is info.nfo and it will containing all extracted files, with original location and new name.
Second file is __start_me.mht and, when you start it looks like this:

Generated with mht2htm
This email address is being protected from spambots. You need JavaScript enabled to view it.
Check for new version
-------------------------

Click Here



If you select another language this will differ.
There is link to my e-mail, link to site and link to converted file.
You can ask is this necessary?
Maybe that my mail and site aren't, but that Click Here can be very important. When you unpack mht that have 10 htm files (frames) usually with meaningless names you'll need to open every until you find right one. This file is generated to always point to main file.

Inside mht can be files encoded in one of two ways: quote-printable files are, we can say, not much encoded, we can read them easy, but same characters are replaced with same sequences. Binary files are base 64 encoded.

commands

There are two "LED lights" on form that are going green when that kind of encoding is in use. QP decoding looks easier, but you'll see always last longer. Reason for this is that in binary files there is no links to search and replace like in QP.

When mht2htm don't have name for one file it will give name txt or b64. If can't determine extension .$$$ will be added.

If there is more files with same name mht2htm will give them number before extension (1), (2)... Numbers are not going in order but represent files position inside mht.