From cd91dbd4f71228e587fc5bbf936088e65eb986aa Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 22 Jun 2019 22:04:56 -0700 Subject: [PATCH] Include sub-command help in documentation. --- .dockerignore | 2 ++ docs/Dockerfile | 5 ++++- docs/reference/command-line.md | 3 ++- scripts/dev-docs | 4 ++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5e2dfce --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git +.tox diff --git a/docs/Dockerfile b/docs/Dockerfile index b7a3d9f..0d4cb9d 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -2,7 +2,10 @@ FROM python:3.7.3-alpine3.9 as borgmatic COPY . /app 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 diff --git a/docs/reference/command-line.md b/docs/reference/command-line.md index 6fc5df5..b66e5fa 100644 --- a/docs/reference/command-line.md +++ b/docs/reference/command-line.md @@ -3,7 +3,8 @@ title: borgmatic command-line reference --- ## 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 %} diff --git a/scripts/dev-docs b/scripts/dev-docs index 817c219..e5c310c 100755 --- a/scripts/dev-docs +++ b/scripts/dev-docs @@ -3,4 +3,8 @@ set -e 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