Bash colorize tool - Desktop Customization & Workflow

Users browsing this thread: 1 Guest(s)
Shiru
Members
Here's a small program I made to colorize text input such as ascii characters.

The code isn't too great and I'll rewrite it when I have the time but it works(for the most part).

Example:
[Image: YNPKs.png]

Download:
https://www.box.com/s/c1732ca82d7b33362796

Install:
Installation:
make
sudo make install
make clean

Uninstall:
make deinstall

Full readme file:
Quote:COLORIZE
By Shiru

Colorize program to modify text input and return colorized output.
Only tested in Bash but it should work in most shells.

Feel free to do whatever with the code you want. :)

note that substrings take priority because of the way it's currently built.
e.g. colorize "abc" "Red{b} Blue{abc}" ill only colorize the 'b',
however using only "Blue{abc}" will fully colorize the text.

To give full strings priority most of the code in colorize.c has to be rewritten.

Also some characters might cause issues.

Installation:
make
sudo make install
make clean

Uninstall:
make deinstall

Help:

Usage: colorize [OPTION]... [FILE]...
Colorizes text input in BASH depending on specified colornames.

Options:
-l, --list list all colornames
-h, --help display this help and exit
-f <file> use specified file content

Examples:
colorize "this is an example" "red{is ex}"
colorize -f textfile.txt -f clrfile.clr

Exit status:
0 if OK,
1 wrong input (e.g., cannot identify command-line argument),
2 malloc failure (e.g., cannot access required memory
3 other
4 something went seriously wrong


Messages In This Thread
Bash colorize tool - by Shiru - 29-08-2012, 02:48 PM
RE: Bash colorize tool - by Jayro - 29-08-2012, 02:54 PM
RE: Bash colorize tool - by gurhush - 30-08-2012, 03:31 AM
RE: Bash colorize tool - by venam - 30-08-2012, 04:17 AM
RE: Bash colorize tool - by Shiru - 30-08-2012, 04:27 PM