diff --git a/src/bin/composer-cli b/src/bin/composer-cli index 30a88e95..e8f71e39 100755 --- a/src/bin/composer-cli +++ b/src/bin/composer-cli @@ -25,48 +25,11 @@ import sys import argparse from composer import vernum +from composer.cli.help import epilog from composer.cli import main VERSION = "{0}-{1}".format(os.path.basename(sys.argv[0]), vernum) -# Documentation for the commands -epilog = """ -compose start Start a compose using the selected blueprint and output type. - types List the supported output types. - status List the status of all running and finished composes. - log [kB] Show the last 1kB of the compose log. - cancel Cancel a running compose and delete any intermediate results. - delete Delete the listed compose results. - details Show detailed information on the compose. - metadata Download the metadata use to create the compose to -metadata.tar - logs Download the compose logs to -logs.tar - results Download all of the compose results; metadata, logs, and image to .tar - image Download the output image from the compose. Filename depends on the type. -blueprints list List the names of the available blueprints. - show Display the blueprint in TOML format. - changes Display the changes for each blueprint. - diff Display the differences between 2 versions of a blueprint. - Commit hash or NEWEST - Commit hash, NEWEST, or WORKSPACE - save Save the blueprint to a file, .toml - delete Delete a blueprint from the server - depsolve Display the packages needed to install the blueprint. - push Push a blueprint TOML file to the server. - freeze Display the frozen blueprint's modules and packages. - freeze show Display the frozen blueprint in TOML format. - freeze save Save the frozen blueprint to a file, .frozen.toml. - tag Tag the most recent blueprint commit as a release. - undo Undo changes to a blueprint by reverting to the selected commit. - workspace Push the blueprint TOML to the temporary workspace storage. -modules list List the available modules. -projects list List the available projects. - info Show details about the listed projects. -sources list List the available sources -sources info Details about the source. -sources add Add a package source to the server. -sources change Change an existing source -sources delete Delete a package source. -""" def get_parser(): """ Return the ArgumentParser for composer-cli""" diff --git a/src/composer/cli/help.py b/src/composer/cli/help.py new file mode 100644 index 00000000..feebe312 --- /dev/null +++ b/src/composer/cli/help.py @@ -0,0 +1,67 @@ +# Copyright (C) 2018 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +compose_help = """ +compose start Start a compose using the selected blueprint and output type. + types List the supported output types. + status List the status of all running and finished composes. + log [kB] Show the last 1kB of the compose log. + cancel Cancel a running compose and delete any intermediate results. + delete Delete the listed compose results. + details Show detailed information on the compose. + metadata Download the metadata use to create the compose to -metadata.tar + logs Download the compose logs to -logs.tar + results Download all of the compose results; metadata, logs, and image to .tar + image Download the output image from the compose. Filename depends on the type. +""" + +blueprints_help = """ +blueprints list List the names of the available blueprints. + show Display the blueprint in TOML format. + changes Display the changes for each blueprint. + diff Display the differences between 2 versions of a blueprint. + Commit hash or NEWEST + Commit hash, NEWEST, or WORKSPACE + save Save the blueprint to a file, .toml + delete Delete a blueprint from the server + depsolve Display the packages needed to install the blueprint. + push Push a blueprint TOML file to the server. + freeze Display the frozen blueprint's modules and packages. + freeze show Display the frozen blueprint in TOML format. + freeze save Save the frozen blueprint to a file, .frozen.toml. + tag Tag the most recent blueprint commit as a release. + undo Undo changes to a blueprint by reverting to the selected commit. + workspace Push the blueprint TOML to the temporary workspace storage. +""" + +modules_help = """ +modules list List the available modules. +""" + +projects_help = """ +projects list List the available projects. + info Show details about the listed projects. +""" + +sources_help = """ +sources list List the available sources +sources info Details about the source. +sources add Add a package source to the server. +sources change Change an existing source +sources delete Delete a package source. +""" + +epilog = compose_help + blueprints_help + modules_help + projects_help + sources_help