special case lines beginning with "[*]" as non-header
add optical sugar
This commit is contained in:
parent
51000d4ad3
commit
5feb78f32b
|
@ -91,7 +91,7 @@ def fixfile(infile, outfile):
|
||||||
if not line:
|
if not line:
|
||||||
break
|
break
|
||||||
if line[0] != "\f":
|
if line[0] != "\f":
|
||||||
if line[0].strip():
|
if line[0].strip() and line[:3] != '[*]':
|
||||||
if line.strip() == LOCALVARS:
|
if line.strip() == LOCALVARS:
|
||||||
break
|
break
|
||||||
fo.write("</pre>\n<h3>%s</h3>\n<pre>" % line.strip())
|
fo.write("</pre>\n<h3>%s</h3>\n<pre>" % line.strip())
|
||||||
|
@ -109,8 +109,9 @@ def fixfile(infile, outfile):
|
||||||
def main():
|
def main():
|
||||||
update = 1
|
update = 1
|
||||||
for file in glob.glob("pep-*.txt"):
|
for file in glob.glob("pep-*.txt"):
|
||||||
print file, "..."
|
newfile = os.path.splitext(file)[0] + ".html"
|
||||||
fixfile(file, os.path.splitext(file)[0] + ".html")
|
print file, "->", newfile
|
||||||
|
fixfile(file, newfile)
|
||||||
|
|
||||||
if len(sys.argv) > 1 and sys.argv[1] == "-n":
|
if len(sys.argv) > 1 and sys.argv[1] == "-n":
|
||||||
update = 0
|
update = 0
|
||||||
|
|
Loading…
Reference in New Issue