65 output_dir = tempfile.mkdtemp(prefix="doxygen")
66 log_file = os.path.join(destination,
'{}-doxygen.log'.
format(name))
67 zip_file = os.path.join(destination,
'{}-docs.zip'.
format(name))
68 doxy_file = os.path.join(output_dir, 'Doxyfile')
70
71 subprocess.call(['doxygen', '-u'], cwd=output_dir)
72 subprocess.call(['doxygen', doxy_file])
73 html_dir = os.path.join(output_dir, 'html')
74 with zipfile.ZipFile(zip_file, 'w') as zip:
75 for root, _, files in os.walk(html_dir):
76 for file in files:
77 filename = os.path.join(root, file)
78 zip.write(filename, os.path.relpath(filename, html_dir))
79 print(
'Wrote ZIP file for {} to {}'.
format(section, zip_file))
81 shutil.rmtree(output_dir, ignore_errors=True)
82
83