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>
23              Name of input file
24
25       -o, --output=<file>
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

Output formats

37       -T, --text
38              Output text (default)
39
40       -H, --html
41              Output HTML
42
43       -M, --pango
44              Output Pango markup
45
46       -L, --latex
47              Output LaTeX
48
49       -P, --tex
50              Output Plain TeX
51
52       -R, --rtf
53              Output RTF
54
55       -B, --bbcode
56              Output BBCode
57
58       -S, --svg
59              Output SVG
60
61

Format options

63       -a, --anchors(=self)
64              Add HTML line anchors (opt: self referencing, assumes -l)
65
66       -d, --doc-title
67              Set HTML/LaTeX/SVG document title
68
69       -f, --fragment
70              Omit HTML header and footer
71
72       -F, --font=<font>
73              Set HTML/RTF/SVG font face
74
75       -k, --ignore-clear(=false)
76              Do not adhere to clear (ESC K) commands (default: true)
77
78       -c, --ignore-csi
79              Do not adhere to CSI commands (useful for UTF-8 input)
80
81       -l, --line-numbers
82              Print line numbers in output file
83
84       -m, --map=<path>
85              Read color mapping file (see README)
86
87       -r, --style-ref=<rf>
88              Set HTML/TeX/LaTeX/SVG stylesheet path
89
90       -s, --font-size=<num?>
91              Set HTML/RTF/SVG font size
92
93       -e, --encoding=<enc>
94              Set  HTML encoding (must match input file encoding); omit encod‐
95              ing information if enc=NONE
96
97       -p, --plain
98              Ignore ANSI formatting information
99
100       -w, --wrap=<len>
101              Wrap long lines
102
103       --no-trailing-nl
104              Omit trailing newline
105
106       --no-version-info
107              Omit version info comment
108
109       --wrap-no-numbers
110              Omit line numbers of wrapped lines (assumes -l)
111
112       --derived-styles
113              Output dynamic stylesheets (HTML/SVG)
114
115

ASCII art options

117       --art-cp437
118              Parse codepage 437 ASCII art (HTML and RTF output)
119
120       --art-bin
121              Parse BIN/XBIN ASCII art  (HTML output, no stdin)
122
123       --art-tundra
124              Parse Tundra ANSI art  (HTML output, no stdin)
125
126       --art-width
127              Set ASCII art width (default 80)
128
129       --art-height
130              Set ASCII art height (default 150)
131
132

OTHER OPTIONS

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

Examples

149       File conversions:
150
151       ansifilter -i text_with_ansi.txt -o text_without_ansi.txt
152
153       tail -f server.log | ansifilter
154
155       ansifilter *.txt
156
157

AUTHORS

159       Andre Simon <a.simon@mailbox.org>
160

SEE ALSO

162       More information at http://www.andre-simon.de/.
163
164
165
166Andre Simon                       2019-10-22                     ansifilter(1)
Impressum