1ansifilter(1) user documentation ansifilter(1)
2
3
4
6 Ansifilter - ANSI escape code processor and converter
7
8
10 ansifilter [d:i:F:m:o:r:s:e:fhptvHRT] [-i input file] [-o output file]
11 [--text] [--html] [--latex] [--tex] [--rtf] [input files]
12
13
15 Ansifilter is a small utility to handle text files containing ANSI ter‐
16 minal escape codes. The command sequences may be stripped or be inter‐
17 preted to generate formatted output (HTML, LaTeX, TeX, RTF).
18
19 See the README file for details.
20
22 -i, --input=<file> (default stdin)
23 Name of input file
24
25 -o, --output=<file> (default stdout)
26 Name of output file
27
28 -O, --outdir=<dir>
29 Name of output directory
30
31 -t, --tail
32 Continue reading after end-of-file (like tail -f). Use system
33 tail if available.
34
35 -x, --max-size=<size>
36 Set maximum input file size (examples: 512M, 1G; default: 256M)
37
38
40 -T, --text
41 Output text (default)
42
43 -H, --html
44 Output HTML
45
46 -M, --pango
47 Output Pango markup
48
49 -L, --latex
50 Output LaTeX
51
52 -P, --tex
53 Output Plain TeX
54
55 -R, --rtf
56 Output RTF
57
58 -B, --bbcode
59 Output BBCode
60
61 -S, --svg
62 Output SVG
63
64
66 -a, --anchors(=self)
67 Add HTML line anchors (opt: self referencing, assumes -l)
68
69 -d, --doc-title
70 Set HTML/LaTeX/SVG document title
71
72 -f, --fragment
73 Omit HTML header and footer
74
75 -F, --font=<font>
76 Set HTML/RTF/SVG font face
77
78 -k, --ignore-clear(=false)
79 Do not adhere to clear (ESC K) commands (default: true)
80
81 -c, --ignore-csi
82 Do not adhere to CSI commands (useful for UTF-8 input)
83
84 -l, --line-numbers
85 Print line numbers in output file
86
87 -m, --map=<path>
88 Read color mapping file (see README)
89
90 -r, --style-ref=<rf>
91 Set HTML/TeX/LaTeX/SVG stylesheet path
92
93 -s, --font-size=<num>
94 Set HTML/RTF/SVG font size
95
96 -e, --encoding=<enc>
97 Set HTML encoding (must match input file encoding); omit encod‐
98 ing information if enc=NONE
99
100 -p, --plain
101 Ignore ANSI formatting information
102
103 -w, --wrap=<len>
104 Wrap long lines
105
106 --no-trailing-nl
107 Omit trailing newline
108
109 --no-version-info
110 Omit version info comment
111
112 --wrap-no-numbers
113 Omit line numbers of wrapped lines (assumes -l)
114
115 --derived-styles
116 Output dynamic stylesheets (HTML/SVG)
117
118
120 --art-cp437
121 Parse codepage 437 ASCII art (HTML and RTF output)
122
123 --art-bin
124 Parse BIN/XBIN ASCII art (HTML output, no stdin)
125
126 --art-tundra
127 Parse Tundra ANSI art (HTML output, no stdin)
128
129 --art-width
130 Set ASCII art width (default 80)
131
132 --art-height
133 Set ASCII art height (default 150)
134
135
137 -h, --help
138 print help
139
140 -v, --version
141 print version and license info
142
143
144 If no in- or output files are specified, stdin and stdout will be used
145 for in- or output. Plain text will be generated, if no output format
146 is given. Parsing XBIN files overrides --art-width, --art-height and
147 --map options. The ANSI art file formats BIN, XBIN and TND cannot be
148 read from stdin.
149
150
152 File conversions:
153
154 ansifilter -i text_with_ansi.txt -o text_without_ansi.txt
155
156 tail -f server.log | ansifilter
157
158 ansifilter *.txt
159
160
162 Andre Simon <a.simon@mailbox.org>
163
165 More information at http://www.andre-simon.de/.
166
167
168
169Andre Simon 2023-01-08 ansifilter(1)