diff --git a/docs/images/cli_help/cz___help.svg b/docs/images/cli_help/cz___help.svg index 64b79fc0bb..fcaf6ef5b5 100644 --- a/docs/images/cli_help/cz___help.svg +++ b/docs/images/cli_help/cz___help.svg @@ -19,136 +19,136 @@ font-weight: 700; } - .terminal-199999382-matrix { + .terminal-607367767-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-199999382-title { + .terminal-607367767-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-199999382-r1 { fill: #c5c8c6 } -.terminal-199999382-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-199999382-r3 { fill: #d0b344 } -.terminal-199999382-r4 { fill: #1984e9;text-decoration: underline; } -.terminal-199999382-r5 { fill: #68a0b3;font-weight: bold } + .terminal-607367767-r1 { fill: #c5c8c6 } +.terminal-607367767-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-607367767-r3 { fill: #d0b344 } +.terminal-607367767-r4 { fill: #1984e9;text-decoration: underline; } +.terminal-607367767-r5 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -160,46 +160,46 @@ - + - - $ cz --help -usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -... - -Commitizen is a powerful release management tool that helps teams maintain  -consistent and meaningful commit messages while automating version management. -For more information, please visit https://commitizen-tools.github.io/commitizen - -options: -  -h, --help            show this help message and exit -  --config CONFIG       The path to the configuration file. -  --debug               Use debug mode. -  -n NAME, --name NAME  Use the given commitizen (default: -                        cz_conventional_commits). -  -nr NO_RAISE, --no-raise NO_RAISE -                        Comma-separated error codes that won't raise error, -                        e.g., cz -nr 1,2,3 bump. See codes at -https://commitizen- -                        tools.github.io/commitizen/exit_codes/ - -commands: -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -    init                Initialize commitizen configuration. -    commit (c)          Create new commit. -    ls                  Show available Commitizens. -    example             Show commit example. -    info                Show information about the cz. -    schema              Show commit schema. -    bump                Bump semantic version based on the git log. -    changelog (ch)      Generate changelog (note that it will overwrite -                        existing files). -    check               Validate that a commit message matches the commitizen -                        schema. -    version             Get the version of the installed commitizen or the -                        current project (default: installed commitizen). - + + $ cz --help +usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +... + +Commitizen is a powerful release management tool that helps teams maintain  +consistent and meaningful commit messages while automating version management. +For more information, please visit https://commitizen-tools.github.io/commitizen + +options: +  -h, --help            show this help message and exit +  --config CONFIG       The path to the configuration file. +  --debug               Use debug mode. +  -n, --name NAME       Use the given commitizen (default: +                        cz_conventional_commits). +  -nr, --no-raise NO_RAISE +                        Comma-separated error codes that won't raise error, +                        e.g., cz -nr 1,2,3 bump. See codes at +https://commitizen- +                        tools.github.io/commitizen/exit_codes/ + +commands: +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +    init                Initialize commitizen configuration. +    commit (c)          Create new commit. +    ls                  Show available Commitizens. +    example             Show commit example. +    info                Show information about the cz. +    schema              Show commit schema. +    bump                Bump semantic version based on the git log. +    changelog (ch)      Generate changelog (note that it will overwrite +                        existing files). +    check               Validate that a commit message matches the commitizen +                        schema. +    version             Get the version of the installed commitizen or the +                        current project (default: installed commitizen). + diff --git a/docs/images/cli_help/cz_bump___help.svg b/docs/images/cli_help/cz_bump___help.svg index ec6b4816f1..e29b71cd8f 100644 --- a/docs/images/cli_help/cz_bump___help.svg +++ b/docs/images/cli_help/cz_bump___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz bump --help -usage: cz bump [-h][--dry-run][--files-only][--version-files-only] -[--local-version][--changelog][--no-verify][--yes] -[--tag-format TAG_FORMAT][--bump-message BUMP_MESSAGE] -[--prerelease {alpha,beta,rc}][--devrelease DEVRELEASE] -[--increment {MAJOR,MINOR,PATCH}] -[--increment-mode {linear,exact}][--check-consistency] -[--annotated-tag] -[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] -[--changelog-to-stdout][--git-output-to-stderr][--retry] -[--major-version-zero][--template TEMPLATE][--extra EXTRA] -[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] -[--version-scheme {pep440,semver,semver2}] -[--version-type {pep440,semver,semver2}] -[--build-metadata BUILD_METADATA][--get-next] -[--allow-no-commit] -[MANUAL_VERSION] - -Bump semantic version based on the git log - -positional arguments: -  MANUAL_VERSION        Bump to the given version (e.g., 1.5.3). - -options: -  -h, --help            show this help message and exit -  --dry-run             Perform a dry run, without committing or modifying -                        files. -  --files-only          Bump version in the `version_files` specified in the -                        configuration file only(deprecated; use --version- -                        files-only instead). -  --version-files-only  Bump version in the files from the config -  --local-version       Bump version only the local version portion (ignoring -                        the public version). -  --changelog, -ch      Generate the changelog for the latest version. -  --no-verify           Bypass the pre-commit and commit-msg hooks. -  --yes                 Accept automatically answered questions. -  --tag-format TAG_FORMAT -                        The format used to tag the commit and read it. Use it -                        in existing projects, and wrap around simple quotes. -  --bump-message BUMP_MESSAGE -                        Template used to create the release commit, useful -                        when working with CI. -  --prerelease {alpha,beta,rc}, -pr {alpha,beta,rc} -                        Type of prerelease. -  --devrelease DEVRELEASE, -d DEVRELEASE -                        Specify non-negative integer for dev release. -  --increment {MAJOR,MINOR,PATCH} -                        Specify the desired increment. -  --increment-mode {linear,exact} -                        Set the method by which the new version is chosen. -'linear'(default) resolves the next version based on -                        typical linear version progression, where bumping of a -                        pre-release with lower precedence than the current -                        pre-release phase maintains the current phase of -                        higher precedence. 'exact' applies the changes that -                        have been specified (or determined from the commit -                        log) without interpretation, ensuring the increment -                        and pre-release are always honored. -  --check-consistency, -cc -                        Check consistency among versions defined in Commitizen -                        configuration file and `version_files`. -  --annotated-tag, -at  Create annotated tag instead of lightweight one. -  --annotated-tag-message ANNOTATED_TAG_MESSAGE, -atm ANNOTATED_TAG_MESSAGE -                        Create annotated tag message. -  --gpg-sign, -s        Sign tag instead of lightweight one. -  --changelog-to-stdout -                        Output changelog to stdout. -  --git-output-to-stderr -                        Redirect git output to stderr. -  --retry               Retry commit if it fails for the first time. -  --major-version-zero  Keep major version at zero, even for breaking changes. -  --template TEMPLATE, -t TEMPLATE -                        Changelog template file name (relative to the current -                        working directory). -  --extra EXTRA, -e EXTRA -                        Changelog extra variables (in the form 'key=value'). -  --file-name FILE_NAME -                        File name of changelog (default: 'CHANGELOG.md'). -  --prerelease-offset PRERELEASE_OFFSET -                        Start pre-releases with this offset. -  --version-scheme {pep440,semver,semver2} -                        Choose version scheme. -  --version-type {pep440,semver,semver2} -                        Deprecated, use `--version-scheme` instead. -  --build-metadata BUILD_METADATA -                        Add additional build-metadata to the version-number. -  --get-next            Determine the next version and write to stdout. -  --allow-no-commit     Bump version without eligible commits. - + + $ cz bump --help +usage: cz bump [-h][--dry-run][--files-only][--version-files-only] +[--local-version][--changelog][--no-verify][--yes] +[--tag-format TAG_FORMAT][--bump-message BUMP_MESSAGE] +[--prerelease {alpha,beta,rc}][--devrelease DEVRELEASE] +[--increment {MAJOR,MINOR,PATCH}] +[--increment-mode {linear,exact}][--check-consistency] +[--annotated-tag] +[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] +[--changelog-to-stdout][--git-output-to-stderr][--retry] +[--major-version-zero][--template TEMPLATE][--extra EXTRA] +[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] +[--version-scheme {pep440,semver,semver2}] +[--version-type {pep440,semver,semver2}] +[--build-metadata BUILD_METADATA][--get-next] +[--allow-no-commit] +[MANUAL_VERSION] + +Bump semantic version based on the git log + +positional arguments: +  MANUAL_VERSION        Bump to the given version (e.g., 1.5.3). + +options: +  -h, --help            show this help message and exit +  --dry-run             Perform a dry run, without committing or modifying +                        files. +  --files-only          Bump version in the `version_files` specified in the +                        configuration file only(deprecated; use --version- +                        files-only instead). +  --version-files-only  Bump version in the files from the config +  --local-version       Bump version only the local version portion (ignoring +                        the public version). +  --changelog, -ch      Generate the changelog for the latest version. +  --no-verify           Bypass the pre-commit and commit-msg hooks. +  --yes                 Accept automatically answered questions. +  --tag-format TAG_FORMAT +                        The format used to tag the commit and read it. Use it +                        in existing projects, and wrap around simple quotes. +  --bump-message BUMP_MESSAGE +                        Template used to create the release commit, useful +                        when working with CI. +  --prerelease, -pr {alpha,beta,rc} +                        Type of prerelease. +  --devrelease, -d DEVRELEASE +                        Specify non-negative integer for dev release. +  --increment {MAJOR,MINOR,PATCH} +                        Specify the desired increment. +  --increment-mode {linear,exact} +                        Set the method by which the new version is chosen. +'linear'(default) resolves the next version based on +                        typical linear version progression, where bumping of a +                        pre-release with lower precedence than the current +                        pre-release phase maintains the current phase of +                        higher precedence. 'exact' applies the changes that +                        have been specified (or determined from the commit +                        log) without interpretation, ensuring the increment +                        and pre-release are always honored. +  --check-consistency, -cc +                        Check consistency among versions defined in Commitizen +                        configuration file and `version_files`. +  --annotated-tag, -at  Create annotated tag instead of lightweight one. +  --annotated-tag-message, -atm ANNOTATED_TAG_MESSAGE +                        Create annotated tag message. +  --gpg-sign, -s        Sign tag instead of lightweight one. +  --changelog-to-stdout +                        Output changelog to stdout. +  --git-output-to-stderr +                        Redirect git output to stderr. +  --retry               Retry commit if it fails for the first time. +  --major-version-zero  Keep major version at zero, even for breaking changes. +  --template, -t TEMPLATE +                        Changelog template file name (relative to the current +                        working directory). +  --extra, -e EXTRA     Changelog extra variables (in the form 'key=value'). +  --file-name FILE_NAME +                        File name of changelog (default: 'CHANGELOG.md'). +  --prerelease-offset PRERELEASE_OFFSET +                        Start pre-releases with this offset. +  --version-scheme {pep440,semver,semver2} +                        Choose version scheme. +  --version-type {pep440,semver,semver2} +                        Deprecated, use `--version-scheme` instead. +  --build-metadata BUILD_METADATA +                        Add additional build-metadata to the version-number. +  --get-next            Determine the next version and write to stdout. +  --allow-no-commit     Bump version without eligible commits. + diff --git a/docs/images/cli_help/cz_changelog___help.svg b/docs/images/cli_help/cz_changelog___help.svg index b0d048caed..e02d9cd235 100644 --- a/docs/images/cli_help/cz_changelog___help.svg +++ b/docs/images/cli_help/cz_changelog___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz changelog --help -usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] -[--unreleased-version UNRELEASED_VERSION][--incremental] -[--start-rev START_REV][--merge-prerelease] -[--version-scheme {pep440,semver,semver2}] -[--export-template EXPORT_TEMPLATE][--template TEMPLATE] -[--extra EXTRA][--tag-format TAG_FORMAT] - - -Generate changelog (note that it will overwrite existing files) - -positional arguments: -  rev_range             Generate changelog for the given version (e.g., 1.5.3) -                        or version range (e.g., 1.5.3..1.7.9). - -options: -  -h, --help            show this help message and exit -  --dry-run             Show changelog to stdout. -  --file-name FILE_NAME -                        File name of changelog (default: 'CHANGELOG.md'). -  --unreleased-version UNRELEASED_VERSION -                        Set the value for the new version (use the tag value), -                        instead of using unreleased versions. -  --incremental         Generate changelog from the last created version, -                        useful if the changelog has been manually modified. -  --start-rev START_REV -                        Start rev of the changelog. If not set, it will -                        generate changelog from the beginning. -  --merge-prerelease    Collect all changes from prereleases into the next -                        non-prerelease. If not set, it will include -                        prereleases in the changelog. -  --version-scheme {pep440,semver,semver2} -                        Choose version scheme. -  --export-template EXPORT_TEMPLATE -                        Export the changelog template into this file instead -                        of rendering it. -  --template TEMPLATE, -t TEMPLATE -                        Changelog template file name (relative to the current -                        working directory). -  --extra EXTRA, -e EXTRA -                        Changelog extra variables (in the form 'key=value'). -  --tag-format TAG_FORMAT -                        The format of the tag, wrap around simple quotes. - + + $ cz changelog --help +usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] +[--unreleased-version UNRELEASED_VERSION][--incremental] +[--start-rev START_REV][--merge-prerelease] +[--version-scheme {pep440,semver,semver2}] +[--export-template EXPORT_TEMPLATE][--template TEMPLATE] +[--extra EXTRA][--tag-format TAG_FORMAT] + + +Generate changelog (note that it will overwrite existing files) + +positional arguments: +  rev_range             Generate changelog for the given version (e.g., 1.5.3) +                        or version range (e.g., 1.5.3..1.7.9). + +options: +  -h, --help            show this help message and exit +  --dry-run             Show changelog to stdout. +  --file-name FILE_NAME +                        File name of changelog (default: 'CHANGELOG.md'). +  --unreleased-version UNRELEASED_VERSION +                        Set the value for the new version (use the tag value), +                        instead of using unreleased versions. +  --incremental         Generate changelog from the last created version, +                        useful if the changelog has been manually modified. +  --start-rev START_REV +                        Start rev of the changelog. If not set, it will +                        generate changelog from the beginning. +  --merge-prerelease    Collect all changes from prereleases into the next +                        non-prerelease. If not set, it will include +                        prereleases in the changelog. +  --version-scheme {pep440,semver,semver2} +                        Choose version scheme. +  --export-template EXPORT_TEMPLATE +                        Export the changelog template into this file instead +                        of rendering it. +  --template, -t TEMPLATE +                        Changelog template file name (relative to the current +                        working directory). +  --extra, -e EXTRA     Changelog extra variables (in the form 'key=value'). +  --tag-format TAG_FORMAT +                        The format of the tag, wrap around simple quotes. + diff --git a/docs/images/cli_help/cz_check___help.svg b/docs/images/cli_help/cz_check___help.svg index 1091491d36..8b17e03f1f 100644 --- a/docs/images/cli_help/cz_check___help.svg +++ b/docs/images/cli_help/cz_check___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz check --help -usage: cz check [-h] -[--commit-msg-file COMMIT_MSG_FILE | --rev-range REV_RANGE | -d  -| -m MESSAGE] -[--allow-abort][--allowed-prefixes [ALLOWED_PREFIXES ...]] -[-l MESSAGE_LENGTH_LIMIT] - -Validate that a commit message matches the commitizen schema - -options: -  -h, --help            show this help message and exit -  --commit-msg-file COMMIT_MSG_FILE -                        Ask for the name of the temporary file that contains -                        the commit message. Use it in a git hook script: -MSG_FILE=$1. -  --rev-range REV_RANGE -                        Validate the commits in the given range of git rev, -                        e.g., master..HEAD. -  -d, --use-default-range -                        Validate the commits from the default branch to HEAD, -                        e.g., refs/remotes/origin/master..HEAD. -  -m MESSAGE, --message MESSAGE -                        Validate the given commit message. -  --allow-abort         Allow empty commit messages, which typically abort a -                        commit. -  --allowed-prefixes [ALLOWED_PREFIXES ...] -                        Skip validation for commit messages that start with -                        the specified prefixes. -  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT -                        Restrict the length of the **first line** of the -                        commit message; 0 for no limit. - + + $ cz check --help +usage: cz check [-h][--commit-msg-file COMMIT_MSG_FILE | +                --rev-range REV_RANGE | -d | -m MESSAGE][--allow-abort] +[--allowed-prefixes [ALLOWED_PREFIXES ...]] +[-l MESSAGE_LENGTH_LIMIT] + +Validate that a commit message matches the commitizen schema + +options: +  -h, --help            show this help message and exit +  --commit-msg-file COMMIT_MSG_FILE +                        Ask for the name of the temporary file that contains +                        the commit message. Use it in a git hook script: +MSG_FILE=$1. +  --rev-range REV_RANGE +                        Validate the commits in the given range of git rev, +                        e.g., master..HEAD. +  -d, --use-default-range +                        Validate the commits from the default branch to HEAD, +                        e.g., refs/remotes/origin/master..HEAD. +  -m, --message MESSAGE +                        Validate the given commit message. +  --allow-abort         Allow empty commit messages, which typically abort a +                        commit. +  --allowed-prefixes [ALLOWED_PREFIXES ...] +                        Skip validation for commit messages that start with +                        the specified prefixes. +  -l, --message-length-limit MESSAGE_LENGTH_LIMIT +                        Restrict the length of the **first line** of the +                        commit message; 0 for no limit. + diff --git a/docs/images/cli_help/cz_commit___help.svg b/docs/images/cli_help/cz_commit___help.svg index 1905186bb5..eea16ac145 100644 --- a/docs/images/cli_help/cz_commit___help.svg +++ b/docs/images/cli_help/cz_commit___help.svg @@ -19,104 +19,104 @@ font-weight: 700; } - .terminal-1022884229-matrix { + .terminal-517664947-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1022884229-title { + .terminal-517664947-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1022884229-r1 { fill: #c5c8c6 } -.terminal-1022884229-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-1022884229-r3 { fill: #68a0b3;font-weight: bold } + .terminal-517664947-r1 { fill: #c5c8c6 } +.terminal-517664947-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-517664947-r3 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -128,36 +128,36 @@ - + - - $ cz commit --help -usage: cz commit [-h][--retry][--no-retry][--dry-run] -[--write-message-to-file FILE_PATH][-s][-a][-e] -[-l MESSAGE_LENGTH_LIMIT][--] - -Create new commit - -options: -  -h, --help            show this help message and exit -  --retry               Retry the last commit. -  --no-retry            Skip retry if --retry or `retry_after_failure` is set -                        to true. -  --dry-run             Perform a dry run, without committing or modifying -                        files. -  --write-message-to-file FILE_PATH -                        Write message to FILE_PATH before committing (can be -                        used with --dry-run). -  -s, --signoff         Deprecated, use `cz commit -- -s` instead. -  -a, --all             Automatically stage files that have been modified and -                        deleted, but new files you have not told Git about are -                        not affected. -  -e, --edit            Edit the commit message before committing. -  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT -                        Set the length limit of the commit message; 0 for no -                        limit. -  --                    Positional arguments separator (recommended). - + + $ cz commit --help +usage: cz commit [-h][--retry][--no-retry][--dry-run] +[--write-message-to-file FILE_PATH][-s][-a][-e] +[-l MESSAGE_LENGTH_LIMIT][--] + +Create new commit + +options: +  -h, --help            show this help message and exit +  --retry               Retry the last commit. +  --no-retry            Skip retry if --retry or `retry_after_failure` is set +                        to true. +  --dry-run             Perform a dry run, without committing or modifying +                        files. +  --write-message-to-file FILE_PATH +                        Write message to FILE_PATH before committing (can be +                        used with --dry-run). +  -s, --signoff         Deprecated, use `cz commit -- -s` instead. +  -a, --all             Automatically stage files that have been modified and +                        deleted, but new files you have not told Git about are +                        not affected. +  -e, --edit            Edit the commit message before committing. +  -l, --message-length-limit MESSAGE_LENGTH_LIMIT +                        Set the length limit of the commit message; 0 for no +                        limit. +  --                    Positional arguments separator (recommended). + diff --git a/docs/images/cli_help/cz_example___help.svg b/docs/images/cli_help/cz_example___help.svg index 6bf85336b8..5ac29a22e3 100644 --- a/docs/images/cli_help/cz_example___help.svg +++ b/docs/images/cli_help/cz_example___help.svg @@ -19,46 +19,46 @@ font-weight: 700; } - .terminal-1249345926-matrix { + .terminal-703430360-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1249345926-title { + .terminal-703430360-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1249345926-r1 { fill: #c5c8c6 } -.terminal-1249345926-r2 { fill: #c5c8c6;font-weight: bold } + .terminal-703430360-r1 { fill: #c5c8c6 } +.terminal-703430360-r2 { fill: #c5c8c6;font-weight: bold } - + - + - + - + - + - + - + - + @@ -70,17 +70,17 @@ - + - - $ cz example --help -usage: cz example [-h] - -Show commit example - -options: -  -h, --help  show this help message and exit - + + $ cz example --help +usage: cz example [-h] + +Show commit example + +options: +  -h, --help  show this help message and exit + diff --git a/docs/images/cli_help/cz_info___help.svg b/docs/images/cli_help/cz_info___help.svg index 5ab81ec051..63ce1ee394 100644 --- a/docs/images/cli_help/cz_info___help.svg +++ b/docs/images/cli_help/cz_info___help.svg @@ -19,46 +19,46 @@ font-weight: 700; } - .terminal-3780805296-matrix { + .terminal-3108929538-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3780805296-title { + .terminal-3108929538-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3780805296-r1 { fill: #c5c8c6 } -.terminal-3780805296-r2 { fill: #c5c8c6;font-weight: bold } + .terminal-3108929538-r1 { fill: #c5c8c6 } +.terminal-3108929538-r2 { fill: #c5c8c6;font-weight: bold } - + - + - + - + - + - + - + - + @@ -70,17 +70,17 @@ - + - - $ cz info --help -usage: cz info [-h] - -Show information about the cz - -options: -  -h, --help  show this help message and exit - + + $ cz info --help +usage: cz info [-h] + +Show information about the cz + +options: +  -h, --help  show this help message and exit + diff --git a/docs/images/cli_help/cz_init___help.svg b/docs/images/cli_help/cz_init___help.svg index 709b779189..daf7d90cd7 100644 --- a/docs/images/cli_help/cz_init___help.svg +++ b/docs/images/cli_help/cz_init___help.svg @@ -19,46 +19,46 @@ font-weight: 700; } - .terminal-3508504009-matrix { + .terminal-2562163483-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3508504009-title { + .terminal-2562163483-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3508504009-r1 { fill: #c5c8c6 } -.terminal-3508504009-r2 { fill: #c5c8c6;font-weight: bold } + .terminal-2562163483-r1 { fill: #c5c8c6 } +.terminal-2562163483-r2 { fill: #c5c8c6;font-weight: bold } - + - + - + - + - + - + - + - + @@ -70,17 +70,17 @@ - + - - $ cz init --help -usage: cz init [-h] - -Initialize commitizen configuration - -options: -  -h, --help  show this help message and exit - + + $ cz init --help +usage: cz init [-h] + +Initialize commitizen configuration + +options: +  -h, --help  show this help message and exit + diff --git a/docs/images/cli_help/cz_ls___help.svg b/docs/images/cli_help/cz_ls___help.svg index fc6e0bc7e7..27bd6b760a 100644 --- a/docs/images/cli_help/cz_ls___help.svg +++ b/docs/images/cli_help/cz_ls___help.svg @@ -19,46 +19,46 @@ font-weight: 700; } - .terminal-4097343530-matrix { + .terminal-3771170172-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4097343530-title { + .terminal-3771170172-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4097343530-r1 { fill: #c5c8c6 } -.terminal-4097343530-r2 { fill: #c5c8c6;font-weight: bold } + .terminal-3771170172-r1 { fill: #c5c8c6 } +.terminal-3771170172-r2 { fill: #c5c8c6;font-weight: bold } - + - + - + - + - + - + - + - + @@ -70,17 +70,17 @@ - + - - $ cz ls --help -usage: cz ls [-h] - -Show available Commitizens - -options: -  -h, --help  show this help message and exit - + + $ cz ls --help +usage: cz ls [-h] + +Show available Commitizens + +options: +  -h, --help  show this help message and exit + diff --git a/docs/images/cli_help/cz_schema___help.svg b/docs/images/cli_help/cz_schema___help.svg index 110569a022..3a0098b2db 100644 --- a/docs/images/cli_help/cz_schema___help.svg +++ b/docs/images/cli_help/cz_schema___help.svg @@ -19,46 +19,46 @@ font-weight: 700; } - .terminal-1104904213-matrix { + .terminal-721452391-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1104904213-title { + .terminal-721452391-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1104904213-r1 { fill: #c5c8c6 } -.terminal-1104904213-r2 { fill: #c5c8c6;font-weight: bold } + .terminal-721452391-r1 { fill: #c5c8c6 } +.terminal-721452391-r2 { fill: #c5c8c6;font-weight: bold } - + - + - + - + - + - + - + - + @@ -70,17 +70,17 @@ - + - - $ cz schema --help -usage: cz schema [-h] - -Show commit schema - -options: -  -h, --help  show this help message and exit - + + $ cz schema --help +usage: cz schema [-h] + +Show commit schema + +options: +  -h, --help  show this help message and exit + diff --git a/docs/images/cli_help/cz_version___help.svg b/docs/images/cli_help/cz_version___help.svg index 0c45576bc5..20331e0972 100644 --- a/docs/images/cli_help/cz_version___help.svg +++ b/docs/images/cli_help/cz_version___help.svg @@ -19,82 +19,82 @@ font-weight: 700; } - .terminal-3401796841-matrix { + .terminal-1926777403-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3401796841-title { + .terminal-1926777403-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-3401796841-r1 { fill: #c5c8c6 } -.terminal-3401796841-r2 { fill: #c5c8c6;font-weight: bold } + .terminal-1926777403-r1 { fill: #c5c8c6 } +.terminal-1926777403-r2 { fill: #c5c8c6;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -106,29 +106,29 @@ - + - - $ cz version --help -usage: cz version [-h][-r | -p | -c | -v][--major | --minor | --tag] - -Get the version of the installed commitizen or the current project (default: -installed commitizen) - -options: -  -h, --help        show this help message and exit -  -r, --report      Output the system information for reporting bugs. -  -p, --project     Output the version of the current project. -  -c, --commitizen  Output the version of the installed commitizen. -  -v, --verbose     Output the version of both the installed commitizen and -                    the current project. -  --major           Output just the major version. Must be used with --project -                    or --verbose. -  --minor           Output just the minor version. Must be used with --project -                    or --verbose. -  --tag             get the version with tag prefix. Need to be used with -                    --project or --verbose. - + + $ cz version --help +usage: cz version [-h][-r | -p | -c | -v][--major | --minor | --tag] + +Get the version of the installed commitizen or the current project (default: +installed commitizen) + +options: +  -h, --help        show this help message and exit +  -r, --report      Output the system information for reporting bugs. +  -p, --project     Output the version of the current project. +  -c, --commitizen  Output the version of the installed commitizen. +  -v, --verbose     Output the version of both the installed commitizen and +                    the current project. +  --major           Output just the major version. Must be used with --project +                    or --verbose. +  --minor           Output just the minor version. Must be used with --project +                    or --verbose. +  --tag             get the version with tag prefix. Need to be used with +                    --project or --verbose. + diff --git a/scripts/gen_cli_help_screenshots.py b/scripts/gen_cli_help_screenshots.py index 0706612391..35dee8a972 100644 --- a/scripts/gen_cli_help_screenshots.py +++ b/scripts/gen_cli_help_screenshots.py @@ -1,42 +1,44 @@ import os import subprocess +from itertools import chain from pathlib import Path from rich.console import Console from commitizen.cli import data -project_root = Path(__file__).parent.parent.absolute() -images_root = project_root / Path("docs") / Path("images") / Path("cli_help") - def gen_cli_help_screenshots() -> None: """Generate the screenshot for help message on each cli command and save them as svg files.""" - if not os.path.exists(images_root): - os.makedirs(images_root) - print(f"Created {images_root}") - - help_cmds = _list_help_cmds() - for cmd in help_cmds: + images_root = Path(__file__).parent.parent / "docs" / "images" / "cli_help" + images_root.mkdir(parents=True, exist_ok=True) + + cz_commands = ( + command["name"] if isinstance(command["name"], str) else command["name"][0] + for command in data["subcommands"]["commands"] + ) + for cmd in chain( + ["cz --help"], (f"cz {cz_command} --help" for cz_command in cz_commands) + ): file_name = f"{cmd.replace(' ', '_').replace('-', '_')}.svg" - _export_cmd_as_svg(cmd, f"{images_root}/{file_name}") - + _export_cmd_as_svg(cmd, images_root / file_name) -def _list_help_cmds() -> list[str]: - cmds = [f"{data['prog']} --help"] + [ - f"{data['prog']} {sub_c['name'] if isinstance(sub_c['name'], str) else sub_c['name'][0]} --help" - for sub_c in data["subcommands"]["commands"] - ] - return cmds +def _export_cmd_as_svg(cmd: str, file_path: Path) -> None: + console = Console(record=True, width=80, file=open(os.devnull, "w")) + print("Processing command:", cmd) -def _export_cmd_as_svg(cmd: str, file_name: str) -> None: + console.print(f"$ {cmd}") stdout = subprocess.run(cmd, shell=True, capture_output=True).stdout.decode("utf-8") - console = Console(record=True, width=80) - console.print(f"$ {cmd}\n{stdout}") - console.save_svg(file_name, title="") + console.print(stdout) + console.save_svg(file_path.as_posix(), title="") + + print("Saved to:", file_path.as_posix()) + +# TODO: generate the screenshot of cz init interactive mode +# TODO: generate the screenshot of cz commit interactive mode if __name__ == "__main__": gen_cli_help_screenshots()