Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / html / swig / maketoc.py
CommitLineData
920dae64
AT
1#!/usr/local/bin/python
2
3import sys
4import os
5chs = open("chapters").readlines()
6
7f = open("Contents.html","w")
8print >>f, """
9<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
10<HTML>
11<HEAD>
12<TITLE>SWIG Users Manual</TITLE>
13</HEAD>
14<BODY BGCOLOR="#ffffff">
15<H1>SWIG Users Manual</H1>
16
17<p>
18"""
19
20f.close()
21
22num = 1
23
24for c in chs:
25 c = c.strip()
26 print "Processing %s" % c
27 if c:
28 os.system("python makechap.py %s %d >> Contents.html" % (c,num))
29 num += 1
30
31f = open("Contents.html","a")
32print >>f, """
33</BODY>
34</HTML>
35"""
36
37