kopia lustrzana https://github.com/bellingcat/auto-archiver
Add multi-type modules to all headings on TOC
rodzic
1ee7981c6e
commit
d8f47ff9e4
|
@ -76,11 +76,12 @@ def generate_module_docs():
|
||||||
# add a link to the autodoc refs
|
# add a link to the autodoc refs
|
||||||
readme_str += f"\n[API Reference](../../../autoapi/{module.name}/index)\n"
|
readme_str += f"\n[API Reference](../../../autoapi/{module.name}/index)\n"
|
||||||
# create the module.type folder, use the first type just for where to store the file
|
# create the module.type folder, use the first type just for where to store the file
|
||||||
type_folder = SAVE_FOLDER / module.type[0]
|
for type in manifest['type']:
|
||||||
type_folder.mkdir(exist_ok=True)
|
type_folder = SAVE_FOLDER / type
|
||||||
with open(type_folder / f"{module.name}.md", "w") as f:
|
type_folder.mkdir(exist_ok=True)
|
||||||
print("writing", SAVE_FOLDER)
|
with open(type_folder / f"{module.name}.md", "w") as f:
|
||||||
f.write(readme_str)
|
print("writing", SAVE_FOLDER)
|
||||||
|
f.write(readme_str)
|
||||||
generate_index(modules_by_type)
|
generate_index(modules_by_type)
|
||||||
|
|
||||||
with open(SAVE_FOLDER / "configs_cheatsheet.md", "w") as f:
|
with open(SAVE_FOLDER / "configs_cheatsheet.md", "w") as f:
|
||||||
|
|
Ładowanie…
Reference in New Issue