Sfoglia il codice sorgente

more human-readable output in usage generation

Antoine Beaupré 9 anni fa
parent
commit
50e7d0f345
2 ha cambiato i file con 14 aggiunte e 7 eliminazioni
  1. 8 7
      docs/Makefile
  2. 6 0
      docs/api.rst

+ 8 - 7
docs/Makefile

@@ -145,10 +145,11 @@ usage: $(shell borg help | grep -A1 "Available commands:" | tail -1 | sed 's/[{}
 
 # generate help file based on usage
 usage/%.rst.inc: ../borg/archiver.py
-	printf ".. _borg_$*:\n\n" > $@
-	printf "borg $*\n" >> $@
-	echo -n borg $* | tr 'a-z- ' '-' >> $@
-	printf "\n::\n\n" >> $@
-	borg help $* --usage-only | sed -e 's/^/    /' >> $@
-	printf "\nDescription\n~~~~~~~~~~~\n" >> $@
-	borg help $* --epilog-only >> $@
+	@echo generating usage for $*
+	@printf ".. _borg_$*:\n\n" > $@
+	@printf "borg $*\n" >> $@
+	@echo -n borg $* | tr 'a-z- ' '-' >> $@
+	@printf "\n::\n\n" >> $@
+	@borg help $* --usage-only | sed -e 's/^/    /' >> $@
+	@printf "\nDescription\n~~~~~~~~~~~\n" >> $@
+	@borg help $* --epilog-only >> $@

+ 6 - 0
docs/api.rst

@@ -0,0 +1,6 @@
+Borg Backup API documentation
+=============================
+
+.. automodule:: borg
+   :members:
+   :undoc-members: