Skip to main content

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).

Metadata

Release files for encolor 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for encolor 0.1.0
File Size Uploaded
encolor-0.1.0.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for encolor 0.1.0
File Interpreter ABI Platform
encolor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.3 kB

Release files / encolor-0.1.0.tar.gz

Download URL encolor-0.1.0.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ad9d56d0edb42926ef8926286dbcee1bd298bb15a213f7535325307de700fefc
BLAKE2b-256 checksum
How to use checksums
58ab382412e62c3c9d1caf49b40576a8dc5a947c0674246a711c957bfa1a1671
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release files / encolor-0.1.0-py3-none-any.whl

Download URL encolor-0.1.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95dff73a6f7df0e9e7b5e930ac4496ef6d338e4f2b06a1bf5fcdd705566df58a
BLAKE2b-256 checksum
How to use checksums
06d8aaddaef298aa4e1e03ab3d9edf7b9d134f9e5554b5f01fff27439b1af322
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page