{"id":15017498,"url":"https://github.com/davidenunes/mkgendocs","last_synced_at":"2026-04-13T02:30:17.736Z","repository":{"id":45508016,"uuid":"253944120","full_name":"davidenunes/mkgendocs","owner":"davidenunes","description":"Markdown documentation generator from Google docstrings","archived":false,"fork":false,"pushed_at":"2024-05-19T21:29:57.000Z","size":388,"stargazers_count":66,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-15T08:06:09.321Z","etag":null,"topics":["ast","autodoc","docstring","documentation","generation","google-dockstrings","markdown","material","mkdocs","python","signature"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidenunes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"davidenunes"}},"created_at":"2020-04-08T00:26:22.000Z","updated_at":"2025-01-15T22:25:39.000Z","dependencies_parsed_at":"2024-05-19T22:31:20.799Z","dependency_job_id":"5259a566-ba2e-40e1-b214-fd86fe9d1e01","html_url":"https://github.com/davidenunes/mkgendocs","commit_stats":{"total_commits":33,"total_committers":3,"mean_commits":11.0,"dds":0.06060606060606055,"last_synced_commit":"5400447eb99b6184151a03b9b08453a82ad2db83"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidenunes%2Fmkgendocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidenunes%2Fmkgendocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidenunes%2Fmkgendocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidenunes%2Fmkgendocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidenunes","download_url":"https://codeload.github.com/davidenunes/mkgendocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239998468,"owners_count":19731612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","autodoc","docstring","documentation","generation","google-dockstrings","markdown","material","mkdocs","python","signature"],"created_at":"2024-09-24T19:50:34.178Z","updated_at":"2026-04-13T02:30:17.644Z","avatar_url":"https://github.com/davidenunes.png","language":"Python","funding_links":["https://ko-fi.com/davidenunes","https://ko-fi.com/Y8Y0RZO6'"],"categories":[],"sub_categories":[],"readme":"## mkgendocs\nA Python package for automatically generating documentation pages in markdown for \nPython source files by parsing **Google style docstring**. The markdown output makes it\nideal to combine with [mkdocs](https://www.mkdocs.org/). \n\nInstead of executing the python code (using the `inspect` package to access signatures and docstrings), we extract the information directly from the source files by parsing them into Abstract Syntax Trees (AST) using the `ast` package. \n\nThe `astor` (AST observe/rewrite) package is also used to convert function or class signatures from AST nodes back into source code strings.\n \n![mkgendocs](mkgendocs.png)\n\n## Installation\nInstall mkgendocs from [PyPI](https://pypi.org/project/mkgendocs/)\n\n```python\npip install mkgendocs\n```\n\n## Usage\n\n```\ngendocs --config mkgendocs.yml\n```\n\nA sources directory is created with the documentation that was automatically generated.\nAny examples in a \"examples\" directory are automatically copied over to the documentation, \nthe module level docstrings of any example source files are also copied and converted to markdown. \n\n\n### Configuration Example\n\n````yaml\nsources_dir: docs/sources\ntemplates_dir: docs/templates\nrepo: https://github.com/davidenunes/tensorx  #link to sources on github\nversion: master                               #link to sources on github\n\npages:\n  - page: \"api/train/model.md\"\n    source: \"tensorx/train/model.py\"\n    methods:\n      - Model:\n          - train\n          - set_optimizer\n  \n  - page: \"api/layers/core.md\"\n    source: 'tensorx/layers.py'\n    classes:\n      - Linear:\n        - compute_shape\n      - Module\n  - page: \"math.md\"\n    source: 'tensorx/math.py'\n    functions:\n      - sparse_multiply_dense\n\n  # creates an index page based on everything from target source\n  - page: \"api/layers/index.md\"\n    source: \"tensorx/layers.py\"\n    index: True\n````\n\n* **sources_dir**: directory where the resulting markdown files are created\n* **templates_dir**: directory where template files can be stored. All the folders and files are \ncopied to the `sources_dir`. Any markdown files are used as templates with the \ntag `{{autogenerated}}` in the template files being replaced by the generated documentation.\n* **repo**: repository to create `view source` links automatically for each class, function, and method;\n* **version**: defaults to \"master\" to create link to sources in the form `https://repo/blob/version/file.py/#L1425`;\n* **pages**: list of pages to be automatically generated from the respective source files and templates:\n    * **page**: path for page template / sources dir for the resulting page;\n    * **source**: path to source file from which the page is to be generated;\n    * **classes**: list of classes to be fully documented; a list of method names can be passed for each class, the default is\n      to generate all methods; \n    * **functions**: list of functions to be documented.\n    * **index**: if True creates an index page for the given sources, you can also specify classes and functions, but not methods\n  \n\n## Buy me a coffee\nIf you find any of this useful, consider getting me some coffee, coffee is great!\n\u003cbr/\u003e\u003cbr/\u003e\n\u003ca href='https://ko-fi.com/Y8Y0RZO6' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidenunes%2Fmkgendocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidenunes%2Fmkgendocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidenunes%2Fmkgendocs/lists"}