Creates a file for each tool with the ".. include::" directives to pull in the original documentation.
()
| 68 | |
| 69 | |
| 70 | def write_tool_docs(): |
| 71 | """ |
| 72 | Creates a file for each tool with the ".. include::" directives to pull in |
| 73 | the original documentation. |
| 74 | """ |
| 75 | for k in doc_all_dirs(): |
| 76 | label = ('.. _{name}:\n\n').format(name=k[0]) |
| 77 | include = ('.. include:: /{path}\n\n').format(path=k[1]) |
| 78 | os.makedirs(os.path.join('docs/tools', os.path.dirname(k[0])), |
| 79 | mode=0o755, exist_ok=True) |
| 80 | with write_file_if_changed('docs/tools/{}.rst'.format(k[0])) as outfile: |
| 81 | outfile.write(label) |
| 82 | outfile.write(include) |
| 83 | |
| 84 | |
| 85 | write_tool_docs() |
no test coverage detected