Include sub-command help in documentation.

This commit is contained in:
Dan Helfman 2019-06-22 22:04:56 -07:00
parent 8fc4efff88
commit cd91dbd4f7
4 changed files with 12 additions and 2 deletions

2
.dockerignore Normal file
View file

@ -0,0 +1,2 @@
.git
.tox

View file

@ -2,7 +2,10 @@ FROM python:3.7.3-alpine3.9 as borgmatic
COPY . /app COPY . /app
RUN pip install --no-cache /app && generate-borgmatic-config && chmod +r /etc/borgmatic/config.yaml RUN pip install --no-cache /app && generate-borgmatic-config && chmod +r /etc/borgmatic/config.yaml
RUN borgmatic --help > /command-line.txt RUN borgmatic --help > /command-line.txt \
&& for action in init prune create check extract list info; do \
echo -e "\n--------------------------------------------------------------------------------\n" >> /command-line.txt \
&& borgmatic "$action" --help >> /command-line.txt; done
FROM node:11.15.0-alpine as html FROM node:11.15.0-alpine as html

View file

@ -3,7 +3,8 @@ title: borgmatic command-line reference
--- ---
## borgmatic options ## borgmatic options
Here are all of the available borgmatic command-line options: Here are all of the available borgmatic command-line options. This includes the separate options for
each action sub-command:
``` ```
{% include borgmatic/command-line.txt %} {% include borgmatic/command-line.txt %}

View file

@ -3,4 +3,8 @@
set -e set -e
docker build --tag borgmatic-docs --file docs/Dockerfile . docker build --tag borgmatic-docs --file docs/Dockerfile .
echo
echo "You can view dev docs at http://localhost:8080"
echo "Note that links within these docs will go to the online docs, so you will need to fiddle with URLs manually to stay in the dev docs."
echo
docker run --interactive --tty --publish 8080:80 --rm borgmatic-docs docker run --interactive --tty --publish 8080:80 --rm borgmatic-docs