# sphinx-autodoc-construct
A Sphinx extension to automatically document your [Contruct](https://construct.readthedocs.io/en/latest/) structs.
## Installation
```bash
pip3 install sphinx-autodoc-construct
```
## Configuration
```python
# conf.py
extensions = {
'...',
'sphinx_autodoc_construct'
}
```
## Usage
```rst
.. automodcon:: my_package.my_module
.. autostruct:: my_package.my_module.my_struct
```
`.. automodcon::` documents all structs found in a module and `.. autostruct::` documents a specific struct.
*And here's the cool part*, once a struct is covered by `.. automodcon::` or `.. autostruct::`, you can link to it in your rst
```rst
:any:`link<my_struct>` is displayed as a hyperlink.
:ref:`mystruct<my_struct>` is displayed as a reference.
```
References can even be used in your commented struct fields
```python
from construct import *
my_struct = Struct(
'id': Int32ul,
'otherId': Int32ul * "index refering to :ref:`other_struct`",
)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/maxdup/sphinx-autodoc-construct",
"name": "sphinx-autodoc-construct",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Maxime Dupuis",
"author_email": "mdupuis@hotmail.ca",
"download_url": "https://files.pythonhosted.org/packages/d3/5a/827c7fc580a4a60e3b6feaa45bed9d4487cd0d3f54af530aadd20e5e1568/sphinx-autodoc-construct-0.1.0.tar.gz",
"platform": null,
"description": "# sphinx-autodoc-construct\n\nA Sphinx extension to automatically document your [Contruct](https://construct.readthedocs.io/en/latest/) structs.\n\n## Installation\n\n```bash\npip3 install sphinx-autodoc-construct\n```\n\n## Configuration\n\n```python\n# conf.py\nextensions = {\n '...',\n 'sphinx_autodoc_construct'\n}\n```\n\n## Usage\n```rst\n.. automodcon:: my_package.my_module\n.. autostruct:: my_package.my_module.my_struct\n```\n\n`.. automodcon::` documents all structs found in a module and `.. autostruct::` documents a specific struct.\n\n*And here's the cool part*, once a struct is covered by `.. automodcon::` or `.. autostruct::`, you can link to it in your rst\n\n```rst\n:any:`link<my_struct>` is displayed as a hyperlink.\n:ref:`mystruct<my_struct>` is displayed as a reference.\n```\n\nReferences can even be used in your commented struct fields\n\n```python\nfrom construct import *\n\nmy_struct = Struct(\n 'id': Int32ul,\n 'otherId': Int32ul * \"index refering to :ref:`other_struct`\",\n)\n```\n\n",
"bugtrack_url": null,
"license": "gpl-3.0",
"summary": "A Sphinx extension to automatically document your Contruct structs.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/maxdup/sphinx-autodoc-construct"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d35a827c7fc580a4a60e3b6feaa45bed9d4487cd0d3f54af530aadd20e5e1568",
"md5": "f8d1e1b017ee75a302ae1728e12309b9",
"sha256": "3ba497ca7c141f13118d0215d0e1057a546ad867e7c0db45fea825e55080d52a"
},
"downloads": -1,
"filename": "sphinx-autodoc-construct-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "f8d1e1b017ee75a302ae1728e12309b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8210,
"upload_time": "2023-07-28T23:44:54",
"upload_time_iso_8601": "2023-07-28T23:44:54.451139Z",
"url": "https://files.pythonhosted.org/packages/d3/5a/827c7fc580a4a60e3b6feaa45bed9d4487cd0d3f54af530aadd20e5e1568/sphinx-autodoc-construct-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-28 23:44:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "maxdup",
"github_project": "sphinx-autodoc-construct",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "sphinx-autodoc-construct"
}