Ansifilter
|
Ansifilter 1.1 is a Text Editor product from andre-simon.de, get 4 Stars SoftSea Rating, Ansifilter handles text files containing ANSI terminal escape codes. The command sequences may be stripped or be interpreted to generate formatted output (HTML or RTF).
This is a text file containing ANSI codes, which are used to output formatted text in UNIX or Linux terminals. This is nice as long as your terminal supports these codes, but what to do if you use a Windows editor? What to do if the developer adjusted the colours of the logging output to suit his yellow-on-green coloured terminal, but you have a black-on-white setup?
You can't solve all problems by installing Cygwin, so ansifilter comes to the rescue:
These screenshots show the Windows and Linux versions of the GUI, which displays a ANSI cluttered file.
Ansifilter strips ANSI codes or converts them to HTML or RTF, if you want to preserve the formatting information.
The utility is also available as command line interface:
ansifilter ansifile.txt will give:
Several ANSI codes:
Bold
Underline
Black
Red
Green
Red Background
Green Background
Image inverted and back
Features
These are the options of the command line interface:
File handling:
-i, --input=<file> Input file (optional)
-o, --output=<file> Output file (optional)
-t, --tail Continue reading after end-of-file (like tail -f)
Use system tail if available
Output text formats:
-T, --text (default) Output text
-R, --rtf Output RTF
-H, --html Output HTML
HTML and RTF options:
-d, --doc-title Set HTML document title
-e, --encoding Set HTML encoding (must match input file encoding)
-F, --font=<font> Set font face
-s, --font-size=<fs> Set font size
-f, --fragment Omit HTML header and footer
-p, --plain Ignore formatting information
Other options:
-h, --help Print help
-v, --version Print version and license info
Examples:
ansifilter -i text_with_ansi.txt -o text_without_ansi.txt
ansifilter *.txt
tail -f server.log | ansifilter
The GUI version also accepts the first command line argument as input file name. The license of this file & disk software is Freeware, you can free download and free use this File & Disk software.

