Usage: clouptest [OPTIONS]
│ │ │ │
│ │ │ │ A CLI that does nothing.
│ │ │ │
│ │ │ │ Input options:
│ │ │ │ --one TEXT 1st input option
│ │ │ │ @@ -411,16 +411,16 @@
│ │ │ │ By default, all option group help sections are aligned , meaning that they
│ │ │ │ share the same column widths. Many people find this visually pleasing and this
│ │ │ │ is also the default behavior of argparse
.
│ │ │ │ Nonetheless, if some of your option groups have shorter options, alignment may
│ │ │ │ result in a lot of wasted space and definitions quite far from option names,
│ │ │ │ which is bad for readability. See this biased example to compare the two modes:
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ Aligned
│ │ │ │
Usage: clouptest [OPTIONS]
│ │ │ │
│ │ │ │ A CLI that does nothing.
│ │ │ │
│ │ │ │ Input options:
│ │ │ │ --one TEXT This description is more likely to be wrapped
│ │ │ │ @@ -441,16 +441,16 @@
│ │ │ │ Other options:
│ │ │ │ --seven [a|b|c|d|e|f|g|h|i] First uncategorized option.
│ │ │ │ --height TEXT Second uncategorized option.
│ │ │ │ --help Show this message and exit.
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ Non-aligned
│ │ │ │
Usage: clouptest [OPTIONS]
│ │ │ │
│ │ │ │ A CLI that does nothing.
│ │ │ │
│ │ │ │ Input options:
│ │ │ │ --one TEXT This description is more likely to be wrapped when aligning.
│ │ │ ├── ./usr/share/doc/python-cloup-doc/html/pages/sections.html
│ │ │ │ @@ -315,16 +315,16 @@
│ │ │ │
│ │ │ │ Adding full sections
│ │ │ │ This is my favourite way of structuring my sections.
│ │ │ │ You can find a runnable example that implements part of the help of Git
│ │ │ │ here .
│ │ │ │ The code below is based on that example.
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ Code
│ │ │ │
import cloup
│ │ │ │ from .commands import ( # import your subcommands
│ │ │ │ git_clone , git_init , git_rm , git_sparse_checkout , git_mv ,
│ │ │ │ git_status , git_log )
│ │ │ │
│ │ │ │ @cloup . group ( 'git' )
│ │ │ │ @@ -345,16 +345,16 @@
│ │ │ │ # Subcommands that are not assigned to a specific section
│ │ │ │ # populate the "default section"
│ │ │ │ git . add_command ( git_status )
│ │ │ │ git . add_command ( git_log )
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
│ │ │ │ Generated help
│ │ │ │
Usage: git [OPTIONS] COMMAND [ARGS]...
│ │ │ │
│ │ │ │ Options:
│ │ │ │ --help Show this message and exit.
│ │ │ │
│ │ │ │ Start a working area (see also: git help tutorial):
│ │ ├── xz --list
│ │ │ @@ -1,13 +1,13 @@
│ │ │ Streams: 1
│ │ │ Blocks: 1
│ │ │ - Compressed size: 323.8 KiB (331528 B)
│ │ │ + Compressed size: 323.8 KiB (331536 B)
│ │ │ Uncompressed size: 4150.0 KiB (4249600 B)
│ │ │ Ratio: 0.078
│ │ │ Check: CRC64
│ │ │ Stream Padding: 0 B
│ │ │ Streams:
│ │ │ Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding
│ │ │ - 1 1 0 0 331528 4249600 0.078 CRC64 0
│ │ │ + 1 1 0 0 331536 4249600 0.078 CRC64 0
│ │ │ Blocks:
│ │ │ Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check
│ │ │ - 1 1 12 0 331488 4249600 0.078 CRC64
│ │ │ + 1 1 12 0 331496 4249600 0.078 CRC64