Kaydet (Commit) 460643b8 authored tarafından Tim Peters's avatar Tim Peters

do_project(): Modernized the code.

üst 5d5e1930
...@@ -301,14 +301,17 @@ def do_content(library, version, output) : ...@@ -301,14 +301,17 @@ def do_content(library, version, output) :
content(book[0], book[3], output) content(book[0], book[3], output)
output.write(contents_footer) output.write(contents_footer)
# Fill in the [FILES] section of the project (.hhp) file.
def do_project( library, output, arch, version) : # 'library' is the list of directory description tuples from
# supported_libraries for the version of the docs getting generated.
def do_project(library, output, arch, version):
output.write(project_template % locals()) output.write(project_template % locals())
for book in library : for book in library:
for page in os.listdir(book[0]) : directory = book[0]
if page[string.rfind(page, '.'):] == '.html' or \ path = directory + '\\%s\n'
page[string.rfind(page, '.'):] == '.css': for page in os.listdir(directory):
output.write(book[0]+ '\\' + page + '\n') if page.endswith('.html') or page.endswith('.css'):
output.write(path % page)
def openfile(file) : def openfile(file) :
...@@ -385,5 +388,3 @@ def do_it(args = None) : ...@@ -385,5 +388,3 @@ def do_it(args = None) :
if __name__ == '__main__' : if __name__ == '__main__' :
do_it() do_it()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment