.TH ansifilter 1 "2020-09-28" "Andre Simon" "user documentation" .SH NAME Ansifilter - ANSI escape code processor and converter .SH SYNOPSIS .B ansifilter [d:i:F:m:o:r:s:e:fhptvHRT] [-i input file] [-o output file] [--text] [--html] [--latex] [--tex] [--rtf] [input files] .SH DESCRIPTION .B Ansifilter is a small utility to handle text files containing ANSI terminal escape codes. The command sequences may be stripped or be interpreted to generate formatted output (HTML, LaTeX, TeX, RTF). .PP See the README file for details. .SH File options .IP "-i, --input=" Name of input file .IP "-o, --output=" Name of output file .IP "-O, --outdir=" Name of output directory .IP "-t, --tail" Continue reading after end-of-file (like tail -f). Use system tail if available. .IP "-x, --max-size=" Set maximum input file size (examples: 512M, 1G; default: 256M) .SH Output formats .IP "-T, --text" Output text (default) .IP "-H, --html" Output HTML .IP "-M, --pango" Output Pango markup .IP "-L, --latex" Output LaTeX .IP "-P, --tex" Output Plain TeX .IP "-R, --rtf" Output RTF .IP "-B, --bbcode" Output BBCode .IP "-S, --svg" Output SVG .SH Format options .IP "-a, --anchors(=self)" Add HTML line anchors (opt: self referencing, assumes -l) .IP "-d, --doc-title" Set HTML/LaTeX/SVG document title .IP "-f, --fragment" Omit HTML header and footer .IP "-F, --font=" Set HTML/RTF/SVG font face .IP "-k, --ignore-clear(=false)" Do not adhere to clear (ESC K) commands (default: true) .IP "-c, --ignore-csi" Do not adhere to CSI commands (useful for UTF-8 input) .IP "-l, --line-numbers" Print line numbers in output file .IP "-m, --map=" Read color mapping file (see README) .IP "-r, --style-ref=" Set HTML/TeX/LaTeX/SVG stylesheet path .IP "-s, --font-size=" Set HTML/RTF/SVG font size .IP "-e, --encoding=" Set HTML encoding (must match input file encoding); omit encoding information if enc=NONE .IP "-p, --plain" Ignore ANSI formatting information .IP "-w, --wrap=" Wrap long lines .IP "--no-trailing-nl" Omit trailing newline .IP "--no-version-info" Omit version info comment .IP "--wrap-no-numbers" Omit line numbers of wrapped lines (assumes -l) .IP "--derived-styles" Output dynamic stylesheets (HTML/SVG) .SH ASCII art options .IP "--art-cp437" Parse codepage 437 ASCII art (HTML and RTF output) .IP "--art-bin" Parse BIN/XBIN ASCII art (HTML output, no stdin) .IP "--art-tundra" Parse Tundra ANSI art (HTML output, no stdin) .IP "--art-width" Set ASCII art width (default 80) .IP "--art-height" Set ASCII art height (default 150) .SH "OTHER OPTIONS" .IP "-h, --help" print help .IP "-v, --version" print version and license info .PP If no in- or output files are specified, stdin and stdout will be used for in- or output. Plain text will be generated, if no output format is given. Parsing XBIN files overrides --art-width, --art-height and --map options. The ANSI art file formats BIN, XBIN and TND cannot be read from stdin. .SH Examples File conversions: .PP ansifilter -i text_with_ansi.txt -o text_without_ansi.txt .PP tail -f server.log | ansifilter .PP ansifilter *.txt .SH AUTHORS Andre Simon .SH SEE ALSO More information at http://www.andre-simon.de/.