{"id":15574313,"url":"https://github.com/gpmueller/clang-api-doc","last_synced_at":"2025-03-29T07:12:47.386Z","repository":{"id":62562419,"uuid":"165427347","full_name":"GPMueller/clang-api-doc","owner":"GPMueller","description":"Generate API documentation for C language dialects using libclang Python","archived":false,"fork":false,"pushed_at":"2021-09-14T20:35:07.000Z","size":76,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T21:46:55.063Z","etag":null,"topics":["api-documentation","api-documentation-tool","clang","libclang-python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GPMueller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-12T19:27:55.000Z","updated_at":"2022-05-05T22:54:29.000Z","dependencies_parsed_at":"2022-11-03T15:30:35.404Z","dependency_job_id":null,"html_url":"https://github.com/GPMueller/clang-api-doc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Fclang-api-doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Fclang-api-doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Fclang-api-doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPMueller%2Fclang-api-doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPMueller","download_url":"https://codeload.github.com/GPMueller/clang-api-doc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246150454,"owners_count":20731419,"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":["api-documentation","api-documentation-tool","clang","libclang-python3"],"created_at":"2024-10-02T18:16:32.795Z","updated_at":"2025-03-29T07:12:47.362Z","avatar_url":"https://github.com/GPMueller.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"clang-api-doc\n=============================\n\nGenerate C API documentation using libclang Python bindings.\n\nFor an example see the [documentation](https://clang-api-doc.readthedocs.io).\n\n[![PyPI version](https://badge.fury.io/py/clang-api-doc.svg)](https://badge.fury.io/py/clang-api-doc)\n[![CI](https://github.com/GPMueller/clang-api-doc/actions/workflows/ci.yml/badge.svg)](https://github.com/GPMueller/clang-api-doc/actions/workflows/ci.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/61ce78fd4cbc41c29ec8eace9bdedca5)](https://www.codacy.com/gh/GPMueller/clang-api-doc/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=GPMueller/clang-api-doc\u0026amp;utm_campaign=Badge_Grade)\n\n\nWhy?\n-----------------------------\n\nIdeally, code should be self-documenting. To me that means little to no documentation should be needed in\nthe code itself, as it strongly tends to harm readability if the code already explains itself. The\nremaining use-cases for documentation are typically\n - **API references**, in particular assumed usage contracts\n - usage examples\n - installation instructions\n - general introductions\n\nThis project focuses on generating API references, as the other use-cases tend to be written separate from\nthe code.\n\nThe markdown-files generated by `clang-api-doc` can be used in any way you wish to create your final\ndocumentation, for example\n- `mkdocs`\n- `sphinx`\n- transform to a different format using `pandoc`\n\n\nInstallation\n-----------------------------\n\nThe `clang-api-doc` package is on PyPI, so you can use `pip`, `poetry`, or whatever you like to install it,\nfor example `pip install clang-api-doc`.\n\nTo install it locally and in editable mode, simply install poetry and run `poetry install` and to load the\nvirtual environment run `poetry shell`.\n\n\nCLI usage\n-----------------------------\n\nSimply call `clang-api-doc` once per file you wish to document, e.g.\n\n```bash\nclang-api-doc -i 'include/mylib/first.h' -o 'docs/first.md'\nclang-api-doc -i 'include/mylib/second.h' -o 'docs/second.md'\n```\n\nor once per folder, e.g.\n\n```bash\nclang-api-doc -i 'include/mylib/' -o 'docs/'\n```\n\n\nPython package usage\n-----------------------------\n\n```python\nfrom clang_api_doc import clang_api_doc\n\nfor file_in, file_out in zip(input_files, output_files):\n    clang_api_doc.transform_file(file_in, file_out)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpmueller%2Fclang-api-doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpmueller%2Fclang-api-doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpmueller%2Fclang-api-doc/lists"}