Removed missing line drawing.
5 from optparse import OptionParser
8 content_files = ("index.html", "resume.html", "howiwork.html", "personalwork.html", "books.html", "links.html", "contact.html", "chrome.html")
10 def create_page(frame_filename, content_filename, output_filename):
11 frame_file = open(frame_filename, "r")
12 frame = frame_file.read()
13 content_file = open(content_filename, "r")
14 content = content_file.read()
15 output_file = open(output_filename, "w")
16 output = frame.replace("/insert{content}", content)
17 output_file.write(output)
23 parser = OptionParser()
24 parser.add_option("-a", "--all", dest="create_all", action="store_true", help="create all pages", default=False)
25 (options, args) = parser.parse_args()
27 #log_file = open("compile.log", "a")
28 frame_filename = args[0]
30 if options.create_all:
31 for f in content_files:
32 content_filename = content_dir + "/" + f
33 output_file = "../" + f
34 create_page(frame_filename, content_filename, output_file)
36 create_page(frame_filename, args[1], args[2])
38 #log = "".join(("Update of file ",
41 # str(datetime.datetime.now()),
46 if __name__ == "__main__":