Sphinx extension to handle Visual Basic Domain.
Project description
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.
# conf.py
extensions = [
'sphinx_vb_domain',
]
Function directive
For example.
.. 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.
# 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_typesdefinition ofVBFunctionclass.
- You can change
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_vb_domain-0.2.0.tar.gz.
File metadata
- Download URL: sphinx_vb_domain-0.2.0.tar.gz
- Upload date:
- Size: 815.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a7049711494484b0f357ec9c6e9a6ae115dadea93437d04da35ce0846ad8be4
|
|
| MD5 |
7655a075cd0aec09a899d3eefa0c6480
|
|
| BLAKE2b-256 |
d2a8edf3e1881dedae4b299d80e5856207e8d716925102a74e883affe2a74a31
|
File details
Details for the file sphinx_vb_domain-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sphinx_vb_domain-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbfbda519fab8832165062f45492352f361b2044c8e725e683b5a3867bf035f5
|
|
| MD5 |
9cbcc0a62a2e936ae72fa8949156089e
|
|
| BLAKE2b-256 |
ff5a4bc051d412e7a126a5738b4dfaaf4ac71553ecebc0fec21f03417d4d98b7
|