#!/usr/bin/env python

import sys

print "<html>"
print "<head>"
print "<style>"
print "pre {line-height: 80%;}"
print "</style>"
print "</head>"

print "<body>"

print "<h1>Imago test</h1>"

for fl in sys.argv[1:]:
    print "<div>"
    print "<h2>" + fl[:-4] + ".jpg" + "</h2>"
    print "<image src=\"" + fl[:-4] + ".jpg" + "\" width=\"600\" style=\"float: right;\" />"
    print "<pre>"
    for line in open(fl).readlines():
        print line
    print "</pre>"
    print "<div style=\"clear: both;\"></div>"
    print "</div>"

print "</body>"
print "</html>"
