sphinx-vb-domain


Namesphinx-vb-domain JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummarySphinx extension to handle Visual Basic Domain.
upload_time2025-01-06 04:19:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords extension sphinx vb visual basic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sphinx-vb-domain

## Overview

Sphinx extension to handle Visual Basic function directive, and also create the directives from document comments in VB source code.

## Installation

### pip

```
pip install sphinx-vb-domain
```

### rye

```
rye add --dev sphinx-vb-domain
```

## Usage

### conf.py

Add it to `extensions`.

```python
# conf.py

extensions = [
    'sphinx_vb_domain',
]
```

### Function directive

For example.

```restructuredtext
.. vb:function:: Private Function getId(ByVal name As String, ByVal age As Integer) As Integer
   :module: Module1

   A simple private function.

   :param name: Name
   :type name: String
   :param age: Age
   :type age: Integer
   :returns: Id
   :rtype: Integer

   Remarks here.
```

### Autodoc

To creade document from VB document comments, following config is needed.

```python
# conf.py

vb_autodoc_paths = [
    ('vb-src-dir', 'page-path', 'page-title'),
]
```

- `vb-src-dir`
    - Path to directory contains VB source, relative from conf.py (e.g. '../../macros').
- `page-path`
    - Path to reST file tobe created, relative from Sphinx source directory (e.g. 'modules' will create 'modules.rst').
- `page-title`
    - Title (level-1 headline) added to e.g. modules.rst.

Then, run sphinx-build with `-D vb_autodoc=1` parameter.

In modules.rst, Module (level-2 headline) is created per vb files in src dir, and function directives under the Modules.

## Known issues

- Function directive always rendered in Japanese like follows.
    ```
    Private Function getId(ByVal name As String, ByVal age As Integer) As Integer
    
        A simple private function.

        パラメータ: ・name (String) -- Name
                    ・age (Integer) -- Age
        戻り値: Id
        戻り値の型: Integer

        Remarks here.
    ```
    - You can change `doc_field_types` definition of `VBFunction` class.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sphinx-vb-domain",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "extension, sphinx, vb, visual basic",
    "author": null,
    "author_email": "satamame <satamame@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b5/56/9eae75d442d0096509bc4b8b76b85f1aea121931d058d56727a8dc35c56a/sphinx_vb_domain-0.2.1.tar.gz",
    "platform": null,
    "description": "# sphinx-vb-domain\n\n## Overview\n\nSphinx extension to handle Visual Basic function directive, and also create the directives from document comments in VB source code.\n\n## Installation\n\n### pip\n\n```\npip install sphinx-vb-domain\n```\n\n### rye\n\n```\nrye add --dev sphinx-vb-domain\n```\n\n## Usage\n\n### conf.py\n\nAdd it to `extensions`.\n\n```python\n# conf.py\n\nextensions = [\n    'sphinx_vb_domain',\n]\n```\n\n### Function directive\n\nFor example.\n\n```restructuredtext\n.. vb:function:: Private Function getId(ByVal name As String, ByVal age As Integer) As Integer\n   :module: Module1\n\n   A simple private function.\n\n   :param name: Name\n   :type name: String\n   :param age: Age\n   :type age: Integer\n   :returns: Id\n   :rtype: Integer\n\n   Remarks here.\n```\n\n### Autodoc\n\nTo creade document from VB document comments, following config is needed.\n\n```python\n# conf.py\n\nvb_autodoc_paths = [\n    ('vb-src-dir', 'page-path', 'page-title'),\n]\n```\n\n- `vb-src-dir`\n    - Path to directory contains VB source, relative from conf.py (e.g. '../../macros').\n- `page-path`\n    - Path to reST file tobe created, relative from Sphinx source directory (e.g. 'modules' will create 'modules.rst').\n- `page-title`\n    - Title (level-1 headline) added to e.g. modules.rst.\n\nThen, run sphinx-build with `-D vb_autodoc=1` parameter.\n\nIn modules.rst, Module (level-2 headline) is created per vb files in src dir, and function directives under the Modules.\n\n## Known issues\n\n- Function directive always rendered in Japanese like follows.\n    ```\n    Private Function getId(ByVal name As String, ByVal age As Integer) As Integer\n    \n        A simple private function.\n\n        \u30d1\u30e9\u30e1\u30fc\u30bf: \u30fbname (String) -- Name\n                    \u30fbage (Integer) -- Age\n        \u623b\u308a\u5024: Id\n        \u623b\u308a\u5024\u306e\u578b: Integer\n\n        Remarks here.\n    ```\n    - You can change `doc_field_types` definition of `VBFunction` class.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Sphinx extension to handle Visual Basic Domain.",
    "version": "0.2.1",
    "project_urls": {
        "Changelog": "https://github.com/satamame/sphinx-vb-domain/releases",
        "Homepage": "https://github.com/satamame/sphinx-vb-domain",
        "Issues": "https://github.com/satamame/sphinx-vb-domain/issues",
        "Repository": "https://github.com/satamame/sphinx-vb-domain.git"
    },
    "split_keywords": [
        "extension",
        " sphinx",
        " vb",
        " visual basic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5cb7d3d4c3cc9027beba1958f3584f64dafdebe19ab95d3b64740e5e8b958f7a",
                "md5": "7be8ed930426961cc80393f30d8c7c0d",
                "sha256": "3cb28e0abaed07a725cc2fe10b162b9b62a61b11b1f58b2176ad7f97d40a4c30"
            },
            "downloads": -1,
            "filename": "sphinx_vb_domain-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7be8ed930426961cc80393f30d8c7c0d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8675,
            "upload_time": "2025-01-06T04:19:50",
            "upload_time_iso_8601": "2025-01-06T04:19:50.162646Z",
            "url": "https://files.pythonhosted.org/packages/5c/b7/d3d4c3cc9027beba1958f3584f64dafdebe19ab95d3b64740e5e8b958f7a/sphinx_vb_domain-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b5569eae75d442d0096509bc4b8b76b85f1aea121931d058d56727a8dc35c56a",
                "md5": "1819b0cd53288cfedb345e386024efcb",
                "sha256": "50731dd1a371a43315fc641cdbe23ce41118f749ba6a1f67aba1173300409107"
            },
            "downloads": -1,
            "filename": "sphinx_vb_domain-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1819b0cd53288cfedb345e386024efcb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 815304,
            "upload_time": "2025-01-06T04:19:55",
            "upload_time_iso_8601": "2025-01-06T04:19:55.591392Z",
            "url": "https://files.pythonhosted.org/packages/b5/56/9eae75d442d0096509bc4b8b76b85f1aea121931d058d56727a8dc35c56a/sphinx_vb_domain-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-06 04:19:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "satamame",
    "github_project": "sphinx-vb-domain",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "sphinx-vb-domain"
}
        
Elapsed time: 0.63583s