Emphasize is a simple CLI program that allows you to emphasize text from stdin or file by text, color, or indent
It works the same as grep tool, but instead of hiding inappropriate strings it emphasizes matched ones
If you are looking for some lines in a continuous flow of logs, you may want to emphasize something you need without hiding everything else. That was the case I wrote this program for
For now, you have to compile it with cargo
git clone https://github.com/bronvic/emphasize.git
cd emphasize
cargo build --release
./target/release/emphasize [options] match_value
Option | Description |
---|---|
-h, --help | Print help menu |
-f, --file | Path to the input file. If omitted, stdin will be used |
-i, --indent | Indent before and after match string. Should be in the range of 0-127 |
-e, --emphasizer | Symbol used to emphasize matched by text. The default symbol is '!'. Works with -t option |
-c, --color | Color of the matched string. See list of colors below |
-t, --text-emphasize | Different modes to emphasize matched string by framing it with added strings and/or modifying its prefix and/or suffix. See list of modes below |
-r, --regexp | Search by regexp |
-C, --without-color | Disables color emphasizing |
You can choose one of this colors:
- black
- blue
- bright_black
- bright_blue
- bright_cyan
- bright_green
- bright_magenta
- bright_red
- bright_white
- bright_yellow
- cyan
- green
- magenta
- red
- white
- yellow
- none - do not emphasize by text
- frame - inserts string made of emphasize symbols before and after the matched string
- prefix - inserts prefix made of one emphasize symbol before the matched string
- all - inserts frame, prefix, and suffix around matches string
Default emphasize symbol is '!'