summaryrefslogtreecommitdiff
path: root/doc/sphinx/binman_docs.py
AgeCommit message (Collapse)Author
8 daysbinman: Add Sphinx extension to auto-generate entry and bintool docsSimon Glass
Currently entries.rst and bintools.rst are generated manually by running 'binman entry-docs' and 'binman bintool-docs', then committed to the repo. This means the docs can drift out of date when docstrings are updated but the RST files are not regenerated. Add a Sphinx extension (binman_docs) that provides two custom directives: .. binman-entry-docs:: .. binman-bintool-docs:: These parse the etype and btool source files using the ast module to extract class docstrings, then insert the documentation directly into the document tree. This avoids the need to import binman modules (which have dependencies like libfdt that are not available in the ReadTheDocs build environment) and avoids writing any intermediate files. Signed-off-by: Simon Glass <[email protected]>