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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file failprint-0.1.0.tar.gz.
File metadata
- Download URL: failprint-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.8.2 Linux/5.6.6-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40fd7e7b4d822cd966fcf6b36f634c62d4899a14522db990c27e25d25aa3f2a5
|
|
| MD5 |
5004971e76d48d638b86fbcf27951fd6
|
|
| BLAKE2b-256 |
37796de2be8eb256c2e7f5801287e31fe4e9db42ee8bb1687e0dd2f5bd4fe51d
|
File details
Details for the file failprint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: failprint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.8.2 Linux/5.6.6-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acdb6538a0066db2023fc4081204da5b84929b63930819e97b5c5eb0d7b817ad
|
|
| MD5 |
60f1c4c5a0468a85b8ccbcedcbf5ef9b
|
|
| BLAKE2b-256 |
216299e420637d06784395dbd31dbbb80bd4a1efd3e074c9f5b6d9127a1577ff
|