()
| 117 | |
| 118 | |
| 119 | def main(): |
| 120 | plugins = list(iter_plugins()) |
| 121 | |
| 122 | reference_dir = pathlib.Path("doc", "en", "reference") |
| 123 | |
| 124 | plugin_list = reference_dir / "plugin_list.rst" |
| 125 | with plugin_list.open("w") as f: |
| 126 | f.write(FILE_HEAD) |
| 127 | f.write(f"This list contains {len(plugins)} plugins.\n\n") |
| 128 | f.write(".. only:: not latex\n\n") |
| 129 | |
| 130 | wcwidth # reference library that must exist for tabulate to work |
| 131 | plugin_table = tabulate.tabulate(plugins, headers="keys", tablefmt="rst") |
| 132 | f.write(indent(plugin_table, " ")) |
| 133 | f.write("\n\n") |
| 134 | |
| 135 | f.write(".. only:: latex\n\n") |
| 136 | f.write(indent("".join(plugin_definitions(plugins)), " ")) |
| 137 | |
| 138 | |
| 139 | if __name__ == "__main__": |
no test coverage detected