Ver código fonte

docs: less space waste following "Common options"

Marian Beermann 8 anos atrás
pai
commit
a1a92bf00f

+ 4 - 0
docs/borg_theme/css/borg.css

@@ -169,3 +169,7 @@ cite {
     font-style: normal;
     text-decoration: underline;
 }
+
+.borg-common-opt-ref {
+    font-weight: bold;
+}

+ 3 - 1
docs/usage/benchmark_crud.rst.inc

@@ -14,8 +14,10 @@ PATH
     path were to create benchmark input data
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/break-lock.rst.inc

@@ -12,8 +12,10 @@ REPOSITORY
     repository for which to break the locks
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/change-passphrase.rst.inc

@@ -12,8 +12,10 @@ REPOSITORY
 
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/check.rst.inc

@@ -20,8 +20,10 @@ optional arguments
     --save-space      work slower, but using less space
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 filters
     -P, --prefix            only consider archive names starting with this prefix.

+ 3 - 1
docs/usage/create.rst.inc

@@ -23,8 +23,10 @@ optional arguments
     --no-cache-sync    experimental: do not synchronize the cache. Implies --no-files-cache.
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Exclusion options
     -e PATTERN, --exclude PATTERN     exclude paths matching PATTERN

+ 3 - 1
docs/usage/delete.rst.inc

@@ -19,8 +19,10 @@ optional arguments
     --save-space    work slower, but using less space
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 filters
     -P, --prefix            only consider archive names starting with this prefix.

+ 3 - 1
docs/usage/diff.rst.inc

@@ -22,8 +22,10 @@ optional arguments
     --sort     Sort the output lines by file path.
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Exclusion options
     -e PATTERN, --exclude PATTERN     exclude paths matching PATTERN

+ 3 - 1
docs/usage/export-tar.rst.inc

@@ -26,8 +26,10 @@ optional arguments
     --strip-components NUMBER         Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped.
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/extract.rst.inc

@@ -27,8 +27,10 @@ optional arguments
     --sparse          create holes in output sparse file from all-zero chunks
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/info.rst.inc

@@ -16,8 +16,10 @@ optional arguments
     --json     format output as JSON
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 filters
     -P, --prefix            only consider archive names starting with this prefix.

+ 3 - 1
docs/usage/init.rst.inc

@@ -18,8 +18,10 @@ optional arguments
     --storage-quota      Set storage quota of the new repository (e.g. 5G, 1.5T). Default: no quota.
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 4 - 5
docs/usage/key.rst

@@ -1,8 +1,3 @@
-.. include:: key_export.rst.inc
-
-
-.. include:: key_import.rst.inc
-
 .. _borg-change-passphrase:
 
 .. include:: key_change-passphrase.rst.inc
@@ -40,3 +35,7 @@ Fully automated using environment variables:
     $ BORG_PASSPHRASE=old BORG_NEW_PASSPHRASE=new borg key change-passphrase repo
     # now "new" is the current passphrase.
 
+
+.. include:: key_export.rst.inc
+
+.. include:: key_import.rst.inc

+ 3 - 1
docs/usage/key_change-passphrase.rst.inc

@@ -12,8 +12,10 @@ REPOSITORY
 
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/key_export.rst.inc

@@ -19,8 +19,10 @@ optional arguments
     --qr-html     Create an html file suitable for printing and later type-in or qr scan
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/key_import.rst.inc

@@ -18,8 +18,10 @@ optional arguments
     --paper     interactively import from a backup done with ``--paper``
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/key_migrate-to-repokey.rst.inc

@@ -12,8 +12,10 @@ REPOSITORY
 
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/list.rst.inc

@@ -22,8 +22,10 @@ optional arguments
     --json-lines    Only valid for listing archive contents. Format output as JSON Lines. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "bpath" key is therefore not available.
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 filters
     -P, --prefix            only consider archive names starting with this prefix.

+ 3 - 1
docs/usage/mount.rst.inc

@@ -19,8 +19,10 @@ optional arguments
     -o     Extra mount options
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 filters
     -P, --prefix            only consider archive names starting with this prefix.

+ 3 - 1
docs/usage/prune.rst.inc

@@ -28,8 +28,10 @@ optional arguments
     --save-space          work slower, but using less space
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 filters
     -P, --prefix            only consider archive names starting with this prefix.

+ 3 - 1
docs/usage/recreate.rst.inc

@@ -21,8 +21,10 @@ optional arguments
     -s, --stats     print statistics at end
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Exclusion options
     -e PATTERN, --exclude PATTERN     exclude paths matching PATTERN

+ 3 - 1
docs/usage/rename.rst.inc

@@ -14,8 +14,10 @@ NEWNAME
     the new archive name to use
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/serve.rst.inc

@@ -17,8 +17,10 @@ optional arguments
     --storage-quota     Override storage quota of the repository (e.g. 5G, 1.5T). When a new repository is initialized, sets the storage quota on the new repository as well. Default: no quota.
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/umount.rst.inc

@@ -12,8 +12,10 @@ MOUNTPOINT
     mountpoint of the filesystem to umount
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/upgrade.rst.inc

@@ -21,8 +21,10 @@ optional arguments
     --disable-tam     Disable manifest authentication (in key and cache)
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 3 - 1
docs/usage/with-lock.rst.inc

@@ -16,8 +16,10 @@ ARGS
     command arguments
 
 
+.. class:: borg-common-opt-ref
+
 :ref:`common_options`
-    |
+
 
 Description
 ~~~~~~~~~~~

+ 1 - 2
setup.py

@@ -290,8 +290,7 @@ class build_usage(Command):
     def write_options(self, parser, fp):
         for group in parser._action_groups:
             if group.title == 'Common options':
-                fp.write('\n\n:ref:`common_options`\n')
-                fp.write('    |')
+                fp.write('\n\n.. class:: borg-common-opt-ref\n\n:ref:`common_options`\n')
             else:
                 self.write_options_group(group, fp)