Print only on failure.
Project description
failprint
Print only on failure.
:warning: Work in progress!
Tired of searching the quiet
options of your programs
to lighten up the output of your make check
or make lint
commands?
Tired of finding out that standard output and error are mixed up in some of them?
Simply run your command through failprint
.
If it succeeds, nothing is printed.
If it fails, standard error is printed.
Plus other configuration goodies :wink:
Example
Some tools output a lot of things. You don't want to see it when the command succeeds.
Without failprint
:
poetry run bandit -s B404 -r src/
poetry run black --check $(PY_SRC)
With failprint
:
poetry run failprint -- bandit -s B404 -r src/
poetry run failprint -- black --check $(PY_SRC)
It's already better, no? Much more readable!
And when everything passes, it's even better:
Usage
usage: failprint [-h] [-f {custom,pretty,tap}] [-o {stdout,stderr,combine}] [-n NUMBER] [-t TITLE] COMMAND [COMMAND ...]
positional arguments:
COMMAND
optional arguments:
-h, --help show this help message and exit
-f {custom,pretty,tap}, --format {custom,pretty,tap}
Output format. Pass your own Jinja2 template as a string with '-f custom=TEMPLATE'.
Available variables: title (command or title passed with -t), code (exit status), success (boolean), failure (boolean),
n (command number passed with -n), output (command output). Available filters: indent (textwrap.indent).
-o {stdout,stderr,combine}, --output {stdout,stderr,combine}
Which output to use. Colors are supported with 'combine' only, unless the command has a 'force color' option.
-n NUMBER, --number NUMBER
Command number. Useful for the 'tap' format.
-t TITLE, --title TITLE
Command title. Default is the command itself.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for failprint-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 796b054fa56c8e54c668564943e1513409ec3bbc8f6b99e64489e60b2642475b |
|
MD5 | 4b27a4dae9094a9796c9064fc2c522ca |
|
BLAKE2b-256 | a5f4be366f8b6497fcfc258455b4a1738bac8816e1317e85d25c22c1447b7798 |