sphinx-c-autodoc
================
|build-status| |coverage| |black| |docs|
Dual-licensed under MIT or the `UNLICENSE <https://unlicense.org>`_.
.. inclusion_begin
A basic attempt at extending `Sphinx`_ and `autodoc`_ to work with C files.
The idea is to add support for similar directives that `autodoc`_ provides. i.e.
A function in ``my_c_file.c``:
.. code-block:: c
/**
* A simple function that adds.
*
* @param a: The initial value
* @param b: The value to add to `a`
*
* @returns The sum of `a` and `b`.
*
*
int my_adding_function(int a, int b) {
return a + b;
}
Could be referenced in documentation as:
.. code-block:: rst
.. autocfunction:: my_c_file.c::my_adding_function
With the resulting documentation output of:
.. Note this isn't using the c:function directive because that doesn't work on
pypi
int my_adding_function(int a, int b)
A simple function that adds.
:Parameters:
* **a** - The initial value
* **b** - The value to add to `a`
:Returns: The sum of `a` and `b`
.. _autodoc: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html
.. _Sphinx: https://www.sphinx-doc.org/en/master/index.html
Requires
--------
* `clang <https://pypi.org/project/clang/>`_
* `beautifulsoup4 <https://www.crummy.com/software/BeautifulSoup/bs4/doc/>`_
Similar Tools
-------------
* `hawkmoth <https://github.com/jnikula/hawkmoth>`_ a sphinx extension that
which will document all of a C file. It supports being able to regex list
files and have those files be documented.
* `breathe <https://github.com/michaeljones/breathe>`_ A doxygen output to
sphinx tool.
.. |build-status| image:: https://github.com/speedyleion/sphinx-c-autodoc/workflows/Python%20package/badge.svg
:alt: Build Status
:scale: 100%
:target: https://github.com/speedyleion/sphinx-c-autodoc/actions?query=workflow%3A%22Python+package%22
.. |coverage| image:: https://codecov.io/gh/speedyleion/sphinx-c-autodoc/branch/master/graph/badge.svg
:alt: Coverage
:scale: 100%
:target: https://codecov.io/gh/speedyleion/sphinx-c-autodoc
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:alt: Code Style
:scale: 100%
:target: https://github.com/psf/black
.. |docs| image:: https://readthedocs.org/projects/sphinx-c-autodoc/badge/?version=latest
:alt: Documentation Status
:target: https://sphinx-c-autodoc.readthedocs.io/en/latest/?badge=latest
.. inclusion_end
Full Documentation
------------------
The complete documentation can be found at https://sphinx-c-autodoc.readthedocs.io/en/latest
Raw data
{
"_id": null,
"home_page": "https://github.com/speedyleion/sphinx-c-autodoc",
"name": "sphinx-c-autodoc",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Nick",
"author_email": "speedyleion@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/05/c2/71a19bb221ac9ea24baa42e8f63104f0c9007b4922f7064ba710dcfd207d/sphinx_c_autodoc-1.3.0.tar.gz",
"platform": null,
"description": "sphinx-c-autodoc\n================\n\n|build-status| |coverage| |black| |docs|\n\nDual-licensed under MIT or the `UNLICENSE <https://unlicense.org>`_.\n\n.. inclusion_begin\n\nA basic attempt at extending `Sphinx`_ and `autodoc`_ to work with C files.\n\nThe idea is to add support for similar directives that `autodoc`_ provides. i.e.\n\nA function in ``my_c_file.c``:\n\n.. code-block:: c\n\n /**\n * A simple function that adds.\n *\n * @param a: The initial value\n * @param b: The value to add to `a`\n *\n * @returns The sum of `a` and `b`.\n *\n *\n int my_adding_function(int a, int b) {\n return a + b;\n }\n\nCould be referenced in documentation as:\n\n.. code-block:: rst\n\n .. autocfunction:: my_c_file.c::my_adding_function\n\nWith the resulting documentation output of:\n\n.. Note this isn't using the c:function directive because that doesn't work on\n pypi\n\nint my_adding_function(int a, int b) \n A simple function that adds.\n\n :Parameters:\n * **a** - The initial value\n * **b** - The value to add to `a`\n\n :Returns: The sum of `a` and `b`\n\n.. _autodoc: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html\n.. _Sphinx: https://www.sphinx-doc.org/en/master/index.html\n\nRequires\n--------\n\n* `clang <https://pypi.org/project/clang/>`_\n* `beautifulsoup4 <https://www.crummy.com/software/BeautifulSoup/bs4/doc/>`_\n\nSimilar Tools\n-------------\n\n* `hawkmoth <https://github.com/jnikula/hawkmoth>`_ a sphinx extension that\n which will document all of a C file. It supports being able to regex list\n files and have those files be documented.\n* `breathe <https://github.com/michaeljones/breathe>`_ A doxygen output to\n sphinx tool.\n\n.. |build-status| image:: https://github.com/speedyleion/sphinx-c-autodoc/workflows/Python%20package/badge.svg\n :alt: Build Status\n :scale: 100%\n :target: https://github.com/speedyleion/sphinx-c-autodoc/actions?query=workflow%3A%22Python+package%22\n\n.. |coverage| image:: https://codecov.io/gh/speedyleion/sphinx-c-autodoc/branch/master/graph/badge.svg\n :alt: Coverage\n :scale: 100%\n :target: https://codecov.io/gh/speedyleion/sphinx-c-autodoc\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :alt: Code Style\n :scale: 100%\n :target: https://github.com/psf/black\n\n.. |docs| image:: https://readthedocs.org/projects/sphinx-c-autodoc/badge/?version=latest\n :alt: Documentation Status\n :target: https://sphinx-c-autodoc.readthedocs.io/en/latest/?badge=latest\n\n.. inclusion_end\n\nFull Documentation\n------------------\n\nThe complete documentation can be found at https://sphinx-c-autodoc.readthedocs.io/en/latest\n\n",
"bugtrack_url": null,
"license": "MIT License, The Unlicense (Unlicense)",
"summary": "A sphinx autodoc extension for c modules",
"version": "1.3.0",
"project_urls": {
"Documentation": "https://sphinx-c-autodoc.readthedocs.io/en/latest/",
"Homepage": "https://github.com/speedyleion/sphinx-c-autodoc",
"Repository": "https://github.com/speedyleion/sphinx-c-autodoc"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aa657300cc250a553f9814bef14e69c40b70a5ba9a3e7eb0b7800f215e3d5441",
"md5": "5fb785fa8ff72d0fe0e0ce9c6f83eebb",
"sha256": "199c6a3ced0b32fa179d82d5fbe5586ec6c51cc2447d0fa0fda67a0bd8967962"
},
"downloads": -1,
"filename": "sphinx_c_autodoc-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5fb785fa8ff72d0fe0e0ce9c6f83eebb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 34255,
"upload_time": "2023-09-21T22:39:58",
"upload_time_iso_8601": "2023-09-21T22:39:58.490890Z",
"url": "https://files.pythonhosted.org/packages/aa/65/7300cc250a553f9814bef14e69c40b70a5ba9a3e7eb0b7800f215e3d5441/sphinx_c_autodoc-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "05c271a19bb221ac9ea24baa42e8f63104f0c9007b4922f7064ba710dcfd207d",
"md5": "8ba3e51e87fd8ea9bbe4a0ba15db2ff1",
"sha256": "2d074c14854042d1cc8a39447419a16a342e440a05b7683f4eb0394c16705f12"
},
"downloads": -1,
"filename": "sphinx_c_autodoc-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "8ba3e51e87fd8ea9bbe4a0ba15db2ff1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 31560,
"upload_time": "2023-09-21T22:40:00",
"upload_time_iso_8601": "2023-09-21T22:40:00.164240Z",
"url": "https://files.pythonhosted.org/packages/05/c2/71a19bb221ac9ea24baa42e8f63104f0c9007b4922f7064ba710dcfd207d/sphinx_c_autodoc-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-21 22:40:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "speedyleion",
"github_project": "sphinx-c-autodoc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "sphinx-c-autodoc"
}