Skip to content

Commit

Permalink
Doc: use breathe.apidoc to collect Doxygen API docs
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Oberbrunner <[email protected]>
  • Loading branch information
garyo committed Nov 18, 2023
1 parent cd716ef commit f669b58
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions Documentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sources/Reference/api
5 changes: 5 additions & 0 deletions Documentation/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ doxygen ofx.doxy > /tmp/ofx-doc-build.out 2>&1
egrep -v "$EXPECTED_ERRS" /tmp/ofx-doc-build.out || true
cd -

# Use breathe.apidoc to collect the Doxygen API docs
rm -rf sources/Reference/api
python -m breathe.apidoc -p 'ofx_reference' -m --force -g class,interface,struct,union,file,namespace,group -o sources/Reference/api doxygen_build/xml


# Build the Sphinx docs
EXPECTED_ERRS="Explicit markup ends without|Duplicate declaration|cpp:func targets a member|undefined label"
sphinx-build -b html sources build > /tmp/ofx-doc-build.out 2>&1
Expand Down
16 changes: 15 additions & 1 deletion Documentation/sources/Reference/DoxygenIndex.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
.. _doxygenIndex:

==============================
Auto-generated Reference Index
==============================

.. doxygenindex::
.. toctree::
:caption: API
:maxdepth: 4
:glob:

api/filelist
api/structlist

==============================
Complete Reference Index
==============================

.. doxygenindex::
1 change: 1 addition & 0 deletions Documentation/sources/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
if read_the_docs_build:
subprocess.call('python ../genPropertiesReference.py -r -i ../../include -o Reference/ofxPropertiesReference.rst', shell=True)
subprocess.call('cd ../../include ; doxygen ofx.doxy', shell=True)
subprocess.call('python -m breathe.apidoc -p ofx_reference -o sources/Reference/api doxygen_build/xml', shell=True)
ps = subprocess.Popen("git rev-parse HEAD | git ls-remote --heads origin | grep $(git rev-parse HEAD) | cut -d / -f 3",shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
branch_name=ps.communicate()[0]
branch_name=branch_name.rstrip().decode('utf-8')
Expand Down

0 comments on commit f669b58

Please sign in to comment.