17 for i in entities.keys ():
18 s = re.sub (i, '\001' + entities[i] + ';', s);
19 s = re.sub ('\001', '&', s);
22 for a in sys.argv[1:]:
23 # hmm, we need: text2html out/foe.txt -> out/foe.html,
24 # -o is a bit overkill?
25 # outfile = os.path.basename (os.path.splitext(a)[0]) + '.html'
26 outfile = os.path.splitext(a)[0] + '.html'
37 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
43 """ % txt2html (open (a).read ())
44 open (outfile, 'w').write (s)