mirror of https://github.com/borgbackup/borg.git
Merge pull request #230 from anarcat/api
add automatically generated API
This commit is contained in:
commit
d27da99208
|
@ -36,7 +36,7 @@ help:
|
||||||
clean:
|
clean:
|
||||||
-rm -rf $(BUILDDIR)/*
|
-rm -rf $(BUILDDIR)/*
|
||||||
|
|
||||||
html: usage
|
html: usage api.rst
|
||||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||||
|
@ -153,3 +153,18 @@ usage/%.rst.inc: ../borg/archiver.py
|
||||||
@borg help $* --usage-only | sed -e 's/^/ /' >> $@
|
@borg help $* --usage-only | sed -e 's/^/ /' >> $@
|
||||||
@printf "\nDescription\n~~~~~~~~~~~\n" >> $@
|
@printf "\nDescription\n~~~~~~~~~~~\n" >> $@
|
||||||
@borg help $* --epilog-only >> $@
|
@borg help $* --epilog-only >> $@
|
||||||
|
|
||||||
|
api.rst: Makefile
|
||||||
|
@echo "auto-generating API documentation"
|
||||||
|
@echo "Borg Backup API documentation" > $@
|
||||||
|
@echo "=============================" >> $@
|
||||||
|
@echo "" >> $@
|
||||||
|
@for mod in ../borg/*.pyx ../borg/*.py; do \
|
||||||
|
if echo "$$mod" | grep -q "/_"; then \
|
||||||
|
continue ; \
|
||||||
|
fi ; \
|
||||||
|
printf ".. automodule:: "; \
|
||||||
|
echo "$$mod" | sed "s!\.\./!!;s/\.pyx\?//;s!/!.!"; \
|
||||||
|
echo " :members:"; \
|
||||||
|
echo " :undoc-members:"; \
|
||||||
|
done >> $@
|
||||||
|
|
|
@ -218,7 +218,7 @@ latex_documents = [
|
||||||
# ['see "AUTHORS" file'], 1)
|
# ['see "AUTHORS" file'], 1)
|
||||||
#]
|
#]
|
||||||
|
|
||||||
extensions = ['sphinx.ext.extlinks']
|
extensions = ['sphinx.ext.extlinks', 'sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode']
|
||||||
|
|
||||||
extlinks = {
|
extlinks = {
|
||||||
'issue': ('https://github.com/borgbackup/borg/issues/%s', '#'),
|
'issue': ('https://github.com/borgbackup/borg/issues/%s', '#'),
|
||||||
|
|
|
@ -16,3 +16,4 @@ Borg Documentation
|
||||||
changes
|
changes
|
||||||
internals
|
internals
|
||||||
development
|
development
|
||||||
|
api
|
||||||
|
|
Loading…
Reference in New Issue