1ansifilter(1)                 user documentation                 ansifilter(1)
2
3
4

NAME

6       Ansifilter - ANSI escape code processor and converter
7
8

SYNOPSIS

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

DESCRIPTION

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

File options

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

Output formats

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

Format options

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       -g,  --no-default-fg
107              Omit default foreground color
108
109       --no-trailing-nl
110              Omit trailing newline
111
112       --no-version-info
113              Omit version info comment
114
115       --wrap-no-numbers
116              Omit line numbers of wrapped lines (assumes -l)
117
118       --derived-styles
119              Output dynamic stylesheets (HTML/SVG)
120
121

ASCII art options

123       --art-cp437
124              Parse codepage 437 ASCII art (HTML and RTF output)
125
126       --art-bin
127              Parse BIN/XBIN ASCII art  (HTML output, no stdin)
128
129       --art-tundra
130              Parse Tundra ANSI art  (HTML output, no stdin)
131
132       --art-width
133              Set ASCII art width (default 80)
134
135       --art-height
136              Set ASCII art height (default 150)
137
138

OTHER OPTIONS

140       -h, --help
141              print help
142
143       -v, --version
144              print version and license info
145
146
147       If no in- or output files are specified, stdin and stdout will be  used
148       for   in- or output.  Plain text will be generated, if no output format
149       is given.  Parsing XBIN files overrides --art-width,  --art-height  and
150       --map  options.   The ANSI art file formats BIN, XBIN and TND cannot be
151       read from stdin.
152
153

Examples

155       File conversions:
156
157       ansifilter -i text_with_ansi.txt -o text_without_ansi.txt
158
159       tail -f server.log | ansifilter
160
161       ansifilter *.txt
162
163

AUTHORS

165       Andre Simon <a.simon@mailbox.org>
166

SEE ALSO

168       More information at http://www.andre-simon.de/.
169
170
171
172Andre Simon                       2023-01-08                     ansifilter(1)
Impressum