bos@599: #!/usr/bin/env python bos@599: bos@599: import glob, os, re bos@599: bos@599: chapter_re = re.compile(r'<(chapter|appendix|preface)\s+id="([^"]+)">') bos@599: filename_re = re.compile(r'<\?dbhtml filename="([^"]+)"\?>') bos@599: title_re = re.compile(r'(.*)') bos@599: bos@599: chapters = glob.glob('../en/ch*.xml') + glob.glob('../en/app*.xml') bos@599: bos@599: fp = open('index-read.html.in', 'w') bos@599: bos@599: print >> fp, ''' bos@599: {% extends "boilerplate.html" %} bos@599: {% block bodycontent %} bos@599: bos@599:
bos@599: {% endblock %}''' bos@599: bos@599: fp.close()