(module)
| 158 | |
| 159 | |
| 160 | def write_automodule(module): |
| 161 | contents = AUTOMODULE_TEMPLATE.format(module=module, underline="=" * len(module),) |
| 162 | automodule_path = DOCS_DIR.joinpath(*module.split(".")).with_suffix(".rst") |
| 163 | try: |
| 164 | automodule_path.parent.mkdir(parents=True) |
| 165 | except FileExistsError: |
| 166 | pass |
| 167 | with open(automodule_path, "w") as automodule_file: |
| 168 | automodule_file.write(contents) |
| 169 | |
| 170 | |
| 171 | def replace_toc(modules): |