Skip to content

Commit 2f2f30e

Browse files
committed
Write README.md
1 parent 96f7c40 commit 2f2f30e

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
11
# mkdocstrings-vba
22

33
A VBA handler for [mkdocstrings](https://github.com/mkdocstrings/mkdocstrings).
4+
5+
Since there is no official way of documenting VBA functions, we have opted for
6+
the [Google Docstring format](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) commonly used
7+
in Python projects. This is conveniently parsed by the [`griffe`](https://mkdocstrings.github.io/griffe) library which
8+
is also used by [`mkdocstrings[python]`](https://mkdocstrings.github.io/python/). The argument types and return types
9+
are taken from the
10+
VBA [Function](https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/function-statement)
11+
or [Sub](https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/sub-statement) signatures,
12+
which we parse using [regex](https://regular-expressions.info).
13+
14+
## Examples
15+
16+
See the [`examples`](examples) folder.
17+
18+
To build an example site:
19+
20+
1. `pip install mkdocstrings mkdocstrings-vba`
21+
2. `cd examples/example1`
22+
3. View the source code.
23+
4. `mkdocs build`
24+
5. cd `site/`
25+
6. View the results.
26+
27+
## Running tests
28+
29+
```shell
30+
python -m unittest
31+
```
32+
33+
This will run all tests. This includes
34+
- Unit tests from `tests/`.
35+
- Doctests from `mkdocstrings_vba/`.
36+
- Full builds from `examples/`.

0 commit comments

Comments
 (0)