X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fbin%2Ftext2html.py;fp=stepmake%2Fbin%2Ftext2html.py;h=0000000000000000000000000000000000000000;hb=0ac07f31e0f95fc18e5916ce756b9c746af7cc58;hp=51f3948ef4aa68507f4f8ebfdd652ad626346981;hpb=2f1263e2ccdddcac2eb9f7d8ce2ed92867d3d160;p=lilypond.git diff --git a/stepmake/bin/text2html.py b/stepmake/bin/text2html.py deleted file mode 100644 index 51f3948ef4..0000000000 --- a/stepmake/bin/text2html.py +++ /dev/null @@ -1,46 +0,0 @@ -#@PYTHON@ -import os -import re -import string -import sys - - -entities = { - "&" : 'amp', - "`" : 'apos', - '>' : 'gt', - '<' : 'lt', - '"' : 'quot', - } - -def txt2html (s): - for i in entities.keys (): - s = re.sub (i, '\001' + entities[i] + ';', s); - s = re.sub ('\001', '&', s); - return s - -for a in sys.argv[1:]: - # hmm, we need: text2html out/foe.txt -> out/foe.html, - # -o is a bit overkill? - # outfile = os.path.basename (os.path.splitext(a)[0]) + '.html' - outfile = os.path.splitext(a)[0] + '.html' - - try: - os.unlink(outfile) - except: - pass - - s = r""" - - - - - - -
-%s
-
-""" % txt2html (open (a).read ()) - open (outfile, 'w').write (s) - -