Source code for superdjango.interfaces.cli.constants

[docs]class EXIT: """Constants for standardizing shell exit codes.""" OK = 0 ERROR = 1 INPUT = 2 USAGE = 64 ENVIRONMENT = 71 IO = 74 TEMP = 75 PERMISSIONS = 77 CONFIG = 78
EXIT_FAILURE = EXIT.ERROR """A shortcut for a shell exit code of "failure".""" EXIT_SUCCESS = EXIT.OK """A shortcut for a shell exit code of "success".""" EXIT_UNKNOWN = 99 """An unknown shell exit code.""" # noinspection PyPep8Naming
[docs]class OUTPUT_FORMAT: """The output formats supported by `python-tabulate`_. .. _python-tabulate: https://bitbucket.org/astanin/python-tabulate The ``MARKDOWN`` format is the same as ``pipe``. """ FANCY_GRID = "fancy_grid" GITUB = "github" GRID = "grid" HTML = "html" JIRA = "jira" LATEX = "latex" LATEX_BOOKTABS = "latex_booktabs" LATEX_RAW = "latex_raw" MARKDOWN = "markdown" MEDIAWIKI = "mediawiki" MOINMOIN = "moinmoin" ORGTBL = "orgtbl" PIPE = "pipe" PLAIN = "plain" PRESTO = "presto" PSQL = "psql" RST = "rst" SIMPLE = "simple" TEXTILE = "textile" YOUTRACK = "youtrack"
OUTPUT_FORMAT_CHOICES = [ OUTPUT_FORMAT.FANCY_GRID, OUTPUT_FORMAT.GITUB, OUTPUT_FORMAT.GRID, OUTPUT_FORMAT.HTML, OUTPUT_FORMAT.JIRA, OUTPUT_FORMAT.LATEX, OUTPUT_FORMAT.LATEX_BOOKTABS, OUTPUT_FORMAT.LATEX_RAW, OUTPUT_FORMAT.MARKDOWN, OUTPUT_FORMAT.MEDIAWIKI, OUTPUT_FORMAT.MOINMOIN, OUTPUT_FORMAT.ORGTBL, OUTPUT_FORMAT.PIPE, OUTPUT_FORMAT.PLAIN, OUTPUT_FORMAT.PRESTO, OUTPUT_FORMAT.PSQL, OUTPUT_FORMAT.RST, OUTPUT_FORMAT.SIMPLE, OUTPUT_FORMAT.TEXTILE, OUTPUT_FORMAT.YOUTRACK, ] """Command line choices for all supported output formats.""" OUTPUT_FORMAT_COMMON_CHOICES = [ OUTPUT_FORMAT.HTML, OUTPUT_FORMAT.MARKDOWN, OUTPUT_FORMAT.PLAIN, OUTPUT_FORMAT.RST, OUTPUT_FORMAT.SIMPLE, ] """Command line choices for the most common output formats.""" DEFAULT_OUTPUT_FORMAT = OUTPUT_FORMAT.PLAIN """The default output format."""