فهرست منبع

Renamed commands.rst to usage.rst

Jonas Borgström 12 سال پیش
والد
کامیت
a35339f2c2

+ 1 - 1
docs/index.rst

@@ -35,7 +35,7 @@ User's Guide
    foreword
    installation
    quickstart
-   commands
+   usage
    faq
 
 Contribute

+ 3 - 1
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

+ 2 - 30
docs/commands.rst → 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 <repository_def>`.
@@ -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

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+

+ 8 - 2
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
+~~~~~~~~~~~
+
+