]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/bin/text2html.py
patch::: 1.4.0.jcn6
[lilypond.git] / stepmake / bin / text2html.py
1 #@PYTHON@
2 import os
3 import string
4 import sys
5
6 for a in sys.argv[1:]:
7         # hmm, we need: text2html out/foe.txt -> out/foe.html,
8         # -o is a bit overkill?
9         # outfile = os.path.basename (os.path.splitext(a)[0]) + '.html'
10         outfile = os.path.splitext(a)[0] + '.html'
11         
12         try:
13             os.unlink(outfile)
14         except:
15             pass
16
17         s = r"""
18 <html><body><pre>
19 %s
20 </pre></body></html>
21 """ % open (a).read ()
22         open (outfile, 'w').write (s)
23
24