- No changes were made, but this will be the last release that includes an API.
- Fixed a bug where unrecognized color code types (e.g. reverse video) in the input were not included in the output.
- Minor packaging cleanup.
- #89 - Fixed an issue that prevented installation from source due to
README.md
not being included in the package.
- Detect bright background and foreground colors that may exist in the input of
ct
. - #87 - The Select Character Set ANSI codes (rarely used) were not being handled (ignored) appropriately, resulting in malformed output.
- Fixed a rare bug that caused
ct
to wait on a key stroke after the program it spawned got closed. - Fixed a regression that reduced the accuracy of highlighting. Specifically, when
ct
was processing long output.
- Introduced an API for ChromaTerm; you can now color the output of your own module.
- Added documentation (hosted at Read the Docs).
- #84 - Improved the accuracy of highlighting input that does not end with a new line.
- #80 - Some programs spawned by CT, like
screen
, were able to escape highlighting. - #81 - Operating System Command (OSC) codes, like setting the title, were not ignored.
- #83 - Handling of text, specifically while typing, is now more consistent.
- Cleaned up the
--reload
option as it was throwing errors from thepsutil
module on some platforms.
- Moved the networking rules out of the defaults; there's a new
contrib/rules
directory that contains topic-specific rules. If you don't have any custom rules, you may want to delete your existing configuration file to get this cleaner version.
- Fixed zero-length matches getting erroneously colored.
- Improved error handling when a rule's
regex
is an integer. - Minor performance optimizations.
- Module restructuring to make the code a bit cleaner.
- Added Python 3.8 support (was already supported – now added to CI workflows).
- Better handling of broken pipes, like when piping into
head
. - The output of the help section is a bit clearer regarding the
program
argument.
- Fixed bug with color detection following changes for #75.
- #74 - ChromaTerm can now run a program and make it look like it lives on the controlling terminal. Simply prepend your command with
ct
. This is useful for coloring programs likect less file.log
. You should still pipe when possible as it's simpler and more logical to look at. - #75 - Some special ANSI codes were not being handled (ignored) appropriately, causing some rules to incorrectly not match.
Thanks to @aaronols for raising the issues above.
- Removed support for the deprecated
group
key in a rule; per-group coloring is still supported, just not using thegroup
key. - Removed uninstallation note for legacy ChromaTerm.
- A bit o' cleanup.
- Fixed a bug when the input contains multiple combined colors (multiple SGR's into a single ANSI escape code).
- Fixed a rare bug where the type of a color was not updated if it was a full reset in the middle of the new color.
- Optimized color handling and tracking.
- Update license classifier for PyPI.
- Removed a bit of redundant code and simplified color type internals.
- Improved handling of existing colors in the input data;
ct
will now detect the type(s) of a compound ANSI code (e.g. foreground and background colors combined into a single SGR sequence).
- Significantly improved the quality of color tracking by doing it per type (i.e. independent foreground, background, and per-style color tracking). This fixes a bug when using, for example,
vi
which, on some platforms, injects some color-resets at start-up to ensure deterministic output. - Adjusted the chunk size per read to increase responsiveness when coloring lots of output.
- Improved performance by removing some redundant operations.
- Changed license to MIT. The master branch of this project is not related to the original ChromaTerm; I prefer to be more relaxed with my code and its license.
- Minor cleanup of readme.
- Any existing colors are temporarily removed from the input before RegEx matching occurs, making the RegEx of the rules more accurate.
- Minor code cleanup.
- No operational changes. Just a bit of cleanup on readme and the setup script.
- #71 - Added
--reload
program argument to instruct all other ChromaTerm instances to reload their config. - #72 - Support for terminal styles (e.g. bold).
- Multiple colors are compiled into a single Control Sequence Introducer (CSI).
- Added deprecation message to group key.
Once again, thanks to @Ren60FHk for the suggestions.
- #70 - Support for multiple groups per rule. Thanks @Ren60FHk for the suggestion.
- Highlighting using a group-specific rule to an optional RegEx group which is not part of the match outputs malformed data.
With a major rewrite into Python 3, the new code is leaps and bounds better than what it was.
- Configuration file format standardized to YAML. This will make any future changes seamless as well as backwards- and forwards-compatible. It's also nicer to read.
- Simple installation via PyPI with
pip3 install chromaterm
. - The color of a rule can optionally be applied to a specific group. By default, it'll color the entire match.
- Color format changed to hex. It is automatically downscaled to the closest
xterm-256
color. - RGB support. The support in your terminal is automatically detected but can be force-enabled with
--rgb
. - Simplified the rule definitions by removing the priority as it is no longer required (see next point).
- Highlight rules can now overlap (collide). Previously, there was a mechanism to prevent this as it wasn't handled very nicely. But not anymore – ChromaTerm will color text as instructed by the rules.
- The default highlight rules have been improved to cover more edge-cases, while being simpler.
- Much better handling of colors in the input. Now, the color of unhighlighted text is restored to what it was. Previously, it was always reset to the default terminal text color.
- ChromaTerm now takes into account ANSI movement sequences, reducing false-positive (mis)matching.
Huge thanks for @cpriest for his suggestions; He took the initiative of raising the issues.