File size: 464 Bytes
e0c2d04 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from pathlib import Path
import mkdocs_gen_files
skip_list = ["init", "python_tokenizer"]
src_root = Path("src/transformer_deploy")
for path in src_root.glob("**/*.py"):
if any([s in str(path) for s in skip_list]):
continue
doc_path = Path("reference", path.relative_to(src_root)).with_suffix(".md")
with mkdocs_gen_files.open(doc_path, "w") as f:
ident = ".".join(path.with_suffix("").parts)
print("::: " + ident, file=f)
|