Skip to content

Commit 4103b75

Browse files
committed
API doc generation section readme
1 parent c2c74bc commit 4103b75

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,29 @@ The [tutorials](tutorials) provide simple projects to show how to use each modul
8383

8484
Please refer to the [examples](examples) README for more informations.
8585

86+
## Generate the API documentation
87+
88+
The documentation is provided in the [doc](./doc) folder and has to be built first.
89+
90+
Sphinx is used to generates the html documentation.
91+
92+
1. The zed-python-api has to be compiled and installed
93+
2. Make sure `sphinx` and `sphinx_rtd_theme` are installed
94+
95+
```bash
96+
cd doc
97+
pip3 install -r requirements.txt
98+
```
99+
100+
3. Generate the documentation by running the provided [Makefile](doc/Makefile) (Linux) or [make.bat](doc/make.bat) (Windows)
101+
102+
```bash
103+
make html
104+
```
105+
106+
4. The documentation can be viewed in a browser by opening the generated [index.html file](doc/build/html/index.html) located in `doc/build/html/`
107+
108+
86109
## Contributing
87110

88111
Feel free to open an issue if you find a bug, or a pull request for bug fixes, features or other improvements.

doc/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd

0 commit comments

Comments
 (0)