How to install mdc2html in Linux


Create a new directory for all files and download the UNIX-version of mdc2html (e.g. on your desktop or in you home-directory, this is only a temporary directory):

mkdir mdc2html
wget http://www.itee.uq.edu.au/~gwat/pers/hiero/mdc2html/release/mdc2html.tgz


Unpack the .tgz-file and delete it afterwards:

tar -xvzf mdc2html.tgz
rm mdc2html.tgz


Now you can start mdc2html by using the command in this directory:

cd mdc2html
perl mdc2html.pl input.txt > output.html


It would be nice if you only had to type "mdc2html" instead of "perl mdc2html.pl". You can achieve this by creating an executable copy of the file mdc2html.pl:

sed "s%^#\!/usr/bin/perl$%#\!`which perl`%" mdc2html.pl > mdc2html; chmod +x mdc2html


Now you can run mdc2html using this shortcut:

./mdc2html input.txt > output.html


If you try to run mdc2html in another directory, you will notice that it won't work. You can launch mdc2html only from the directory "mdc2html" you just created. Moreover, the HTML-pages generated by mdc2html depend on the image files in the subdirectories of this directory, so if you move the HTML-files to another location, the hieroglyphs won't be displayed anymore. If you use any HTML-file generated by mdc2html in your website, be sure to upload the image-directories (hgifr and hgifs) too!

If you install mdc2html in any of the usual system directories (e.g. /usr/share), you cannot save your files in the same directory (because only the root-user would be allowed to do that). Therefore, the best place to install mdc2html should be somewhere in your home-directory, because mdc2html will be able to save your HTML-files there:

cd ..
sudo mv -r mdc2html/ ~




Tested (version 2.0.4) in:

  • Ubuntu (6.10)