kleinigkeiten

This commit is contained in:
age 2006-08-12 16:28:38 +00:00
parent 7801f013ea
commit 2296126d3e

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env pythonx
#-*- coding: UTF-8 -*- #-*- coding: UTF-8 -*-
'''gets a latex2html file and returns the file with a css tag '''gets a latex2html file and returns the file with a css tag
and stuff''' and stuff'''
@ -6,7 +6,6 @@ import string
import sys import sys
import re import re
def writeFile(data, filename): def writeFile(data, filename):
""" """
write data to the given filename write data to the given filename
@ -51,9 +50,9 @@ try:
startoffset=string.find(content,'<DIV CLASS="author_info"') startoffset=string.find(content,'<DIV CLASS="author_info"')
endoffset=string.find(content,"</STRONG>",startoffset)+len("</STRONG>") endoffset=string.find(content,"</STRONG>",startoffset)+len("</STRONG>")
if (startoffset >10) and (endoffset>startoffset): if (startoffset >10) and (endoffset>startoffset):
content=string.replace(content,'<P ALIGN="CENTER">',"<P>") content=string.replace(content,'<P ALIGN="CENTER">',"<P>")
content=string.replace(content,"<STRONG>","") content=string.replace(content,"<STRONG>","")
content=string.replace(content,"</STRONG>","") content=string.replace(content,"</STRONG>","")
#TOC formatieren - Der Abschnitt <A NAME="SECTION00001000000000000000"> muss noch allgemeiner werden #TOC formatieren - Der Abschnitt <A NAME="SECTION00001000000000000000"> muss noch allgemeiner werden
content = string.replace(content,'<BR>\n\n<H2><A NAME="SECTION00001000000000000000">\nInhalt</A>\n</H2>\n<!--Table of Contents-->','\n<div id="toc">\n<div id="toctitle">Auf dieser Seite:</div>') content = string.replace(content,'<BR>\n\n<H2><A NAME="SECTION00001000000000000000">\nInhalt</A>\n</H2>\n<!--Table of Contents-->','\n<div id="toc">\n<div id="toctitle">Auf dieser Seite:</div>')
@ -97,4 +96,3 @@ except: #read/write/whatever failed,
sys.exit(1) sys.exit(1)
sys.exit(0) sys.exit(0)