Easily automate colorizing terminal output
Project description
Encolor
encolor is a simple tool that adds color to terminal output. To select which patterns to colorize, you can use simple, but extensible (complete support for Python regex) syntax.
Installation
Pre-built
You can install encolor from PyPI using pip:
pip install encolor
Compile
Alternatively, you can compile the project yourself.
git clone https://github.com/Froloket64/encolor.git --depth 1 ~/encolor # You can change "~/encolor" to any other dir
pip install ~/encolor
Usage
You can use the app from terminal:
# Standalone
encolor -r "def: red, \(|\): gray" sub "def main():"
# With a pipe
echo "def main():" | encolor -r "def: red, \(|\): gray" sub
Or use the functions from within your Python code:
from encolor import gfx
print(gfx.colorize_ansi("def main():", "red"))
You can see syntax specification on the Github Wiki page.
For full documentation on module functionality, please refer to the source code (for now).
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 encolor-0.1.0.tar.gz.
File metadata
- Download URL: encolor-0.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad9d56d0edb42926ef8926286dbcee1bd298bb15a213f7535325307de700fefc
|
|
| MD5 |
504fc1ca82120681de311b7032611a28
|
|
| BLAKE2b-256 |
58ab382412e62c3c9d1caf49b40576a8dc5a947c0674246a711c957bfa1a1671
|
File details
Details for the file encolor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: encolor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95dff73a6f7df0e9e7b5e930ac4496ef6d338e4f2b06a1bf5fcdd705566df58a
|
|
| MD5 |
a3c01c818f8313e920d9538794091522
|
|
| BLAKE2b-256 |
06d8aaddaef298aa4e1e03ab3d9edf7b9d134f9e5554b5f01fff27439b1af322
|