diff --git a/docs/index.rst b/docs/index.rst index 5d9116fd2..f475b1616 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -35,7 +35,7 @@ User's Guide foreword installation quickstart - commands + usage faq Contribute diff --git a/docs/update_usage.sh b/docs/update_usage.sh index a8e638190..6854c5f65 100755 --- a/docs/update_usage.sh +++ b/docs/update_usage.sh @@ -4,6 +4,8 @@ if [ ! -d usage ]; then fi for cmd in change-passphrase create delete extract info init list mount prune verify; do FILENAME="usage/$cmd.rst.inc" - echo -e "Synopsis\n~~~~~~~~\n::\n" > $FILENAME + LINE=`echo -n attic $cmd | tr 'a-z- ' '-'` + echo -e "attic $cmd\n$LINE\n::\n\n" > $FILENAME attic $cmd -h | sed -e 's/^/ /' >> $FILENAME + echo -e "\nDescription\n~~~~~~~~~~~\n\n" >> $FILENAME done diff --git a/docs/commands.rst b/docs/usage.rst similarity index 95% rename from docs/commands.rst rename to docs/usage.rst index 794f0e7e8..f6293c432 100644 --- a/docs/commands.rst +++ b/docs/usage.rst @@ -1,8 +1,8 @@ .. include:: global.rst.inc .. _detailed_usage: -Commands -======== +Usage +===== |project_name| consists of a number of commands. Each command accepts a number of arguments and options. The following sections will describe each @@ -17,9 +17,6 @@ messages as it is processing. .. _attic_init: -attic init ----------- - .. include:: usage/init.rst.inc This command initializes an empty :ref:`repository `. @@ -41,9 +38,6 @@ Examples $ attic init --passphrase user@hostname:mybackuprepo.attic -attic create ------------- - .. include:: usage/create.rst.inc This command creates a backup archive containing all files found while @@ -70,8 +64,6 @@ Examples .. _attic_extract: -attic extract -------------- .. include:: usage/extract.rst.inc @@ -97,9 +89,6 @@ Examples $ attic extract /data/myrepo::my-files home/USERNAME/src --exclude *.o -attic verify ------------- - .. include:: usage/verify.rst.inc This command is similar to :ref:`attic_extract` but instead of writing any @@ -108,9 +97,6 @@ not corrupt. |project_name| will not compare the the archived files with the files on disk. -attic delete ------------- - .. include:: usage/delete.rst.inc This command deletes an archive from the repository. Any disk space not @@ -119,8 +105,6 @@ shared with any other existing archive is also reclaimed. .. _attic_list: -attic list ----------- .. include:: usage/list.rst.inc @@ -146,9 +130,6 @@ Examples ... -attic prune ------------ - .. include:: usage/prune.rst.inc The ``prune`` command prunes a repository by deleting archives not matching @@ -167,9 +148,6 @@ Examples $ attic prune /data/myrepo --daily=7 --weekly=4 --prefix=foo -attic info ----------- - .. include:: usage/info.rst.inc This command displays some detailed information about the specified archive. @@ -191,9 +169,6 @@ Examples Unique data: 64805454 (61.80 MB) -attic mount ------------ - .. include:: usage/mount.rst.inc This command mounts an archive as a FUSE filesystem. This can be useful for @@ -211,9 +186,6 @@ Examples $ fusermount -u /tmp/mymountpoint -attic change-passphrase ------------------------ - .. include:: usage/change-passphrase.rst.inc The key files used for repository encryption are optionally passphrase diff --git a/docs/usage/change-passphrase.rst.inc b/docs/usage/change-passphrase.rst.inc index 03866b16a..4d4a160a1 100644 --- a/docs/usage/change-passphrase.rst.inc +++ b/docs/usage/change-passphrase.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic change-passphrase +----------------------- :: + usage: attic change-passphrase [-h] [-v] REPOSITORY Change repository key file passphrase @@ -12,3 +13,8 @@ Synopsis optional arguments: -h, --help show this help message and exit -v, --verbose verbose output + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/create.rst.inc b/docs/usage/create.rst.inc index bc7c21d19..5286517d1 100644 --- a/docs/usage/create.rst.inc +++ b/docs/usage/create.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic create +------------ :: + usage: attic create [-h] [-v] [-s] [-e PATTERN] [-c SECONDS] [--do-not-cross-mountpoints] [--numeric-owner] ARCHIVE PATH [PATH ...] @@ -23,3 +24,8 @@ Synopsis --do-not-cross-mountpoints do not cross mount points --numeric-owner only store numeric user and group identifiers + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/delete.rst.inc b/docs/usage/delete.rst.inc index f83b44f41..a089c0c3c 100644 --- a/docs/usage/delete.rst.inc +++ b/docs/usage/delete.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic delete +------------ :: + usage: attic delete [-h] [-v] ARCHIVE Delete archive @@ -12,3 +13,8 @@ Synopsis optional arguments: -h, --help show this help message and exit -v, --verbose verbose output + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/extract.rst.inc b/docs/usage/extract.rst.inc index fddb85a90..b11842677 100644 --- a/docs/usage/extract.rst.inc +++ b/docs/usage/extract.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic extract +------------- :: + usage: attic extract [-h] [-v] [-e PATTERN] [--numeric-owner] ARCHIVE [PATH [PATH ...]] @@ -17,3 +18,8 @@ Synopsis -e PATTERN, --exclude PATTERN exclude paths matching PATTERN --numeric-owner only obey numeric user and group identifiers + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/info.rst.inc b/docs/usage/info.rst.inc index 509e11c26..09d8735e5 100644 --- a/docs/usage/info.rst.inc +++ b/docs/usage/info.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic info +---------- :: + usage: attic info [-h] [-v] ARCHIVE Show archive details such as disk space used @@ -12,3 +13,8 @@ Synopsis optional arguments: -h, --help show this help message and exit -v, --verbose verbose output + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/init.rst.inc b/docs/usage/init.rst.inc index 4cb5fe228..51816ffea 100644 --- a/docs/usage/init.rst.inc +++ b/docs/usage/init.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic init +---------- :: + usage: attic init [-h] [-v] [--key-file] [--passphrase] REPOSITORY Initialize an empty repository @@ -14,3 +15,8 @@ Synopsis -v, --verbose verbose output --key-file enable key file based encryption --passphrase enable passphrase based encryption + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/list.rst.inc b/docs/usage/list.rst.inc index 4db0b914e..8cb3e503c 100644 --- a/docs/usage/list.rst.inc +++ b/docs/usage/list.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic list +---------- :: + usage: attic list [-h] [-v] REPOSITORY_OR_ARCHIVE List archive or repository contents @@ -13,3 +14,8 @@ Synopsis optional arguments: -h, --help show this help message and exit -v, --verbose verbose output + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/mount.rst.inc b/docs/usage/mount.rst.inc index 0156f8ed8..ffe64d651 100644 --- a/docs/usage/mount.rst.inc +++ b/docs/usage/mount.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic mount +----------- :: + usage: attic mount [-h] [-v] [-f] [-o OPTIONS] ARCHIVE MOUNTPOINT Mount archive as a FUSE fileystem @@ -15,3 +16,8 @@ Synopsis -v, --verbose verbose output -f, --foreground stay in foreground, do not daemonize -o OPTIONS Extra mount options + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/prune.rst.inc b/docs/usage/prune.rst.inc index e1c92892a..0e3b134d6 100644 --- a/docs/usage/prune.rst.inc +++ b/docs/usage/prune.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic prune +----------- :: + usage: attic prune [-h] [-v] [-H HOURLY] [-d DAILY] [-w WEEKLY] [-m MONTHLY] [-y YEARLY] [-p PREFIX] REPOSITORY @@ -26,3 +27,8 @@ Synopsis number of yearly archives to keep -p PREFIX, --prefix PREFIX only consider archive names starting with this prefix + +Description +~~~~~~~~~~~ + + diff --git a/docs/usage/verify.rst.inc b/docs/usage/verify.rst.inc index d60f1c13e..38fcadf8a 100644 --- a/docs/usage/verify.rst.inc +++ b/docs/usage/verify.rst.inc @@ -1,7 +1,8 @@ -Synopsis -~~~~~~~~ +attic verify +------------ :: + usage: attic verify [-h] [-v] [-e PATTERN] ARCHIVE [PATH [PATH ...]] Verify archive consistency @@ -15,3 +16,8 @@ Synopsis -v, --verbose verbose output -e PATTERN, --exclude PATTERN exclude paths matching PATTERN + +Description +~~~~~~~~~~~ + +