swig/Doc/Manual/maketoc.py
Dave Beazley 12a43edc2d The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-11-30 22:01:28 +00:00

36 lines
494 B
Python

#!/usr/local/bin/python
import sys
import os
chs = open("chapters").readlines()
f = open("Contents.html","w")
print >>f, """
<HTML>
<HEAD>
<TITLE>SWIG Users Manual</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>SWIG Users Manual</H1>
<p>
"""
f.close()
num = 0
for c in chs:
c = c.strip()
print "Processing %s" % c
if c:
os.system("python makechap.py %s %d >> Contents.html" % (c,num))
num += 1
f = open("Contents.html","a")
print >>f, """
</BODY>
</HTML>
"""