#!/usr/bin/env python3 import sys import os chs = open("chapters").readlines() f = open("Contents.html","w") f.write("""
""") f.close() num = 1 for c in chs: c = c.strip() print("Processing " + c) if c: os.system("python3 makechap.py %s %d >> Contents.html" % (c,num)) num += 1 f = open("Contents.html","a") f.write(""" """)