1AHA(1)                    BSD General Commands Manual                   AHA(1)
2

NAME

4     aha — Convert ANSI escape sequences to HTML
5

SYNOPSIS

7     aha [-bhlnprsvwx] [-c file] [-f file] [-i X] [-L LANG] [-t TITLE]
8         [-y STYLE]
9

DESCRIPTION

11     aha reads ECMA-48 SGR-colored text from the standard input, converts it
12     to colored HTML and writes it to the standard output.  The options are as
13     follows:
14
15     -b, --black
16             Style HTML output to use a black background with white text.
17
18     -c file, --css file
19             Adds the given css file to the output. In fact just adds <link
20             rel="stylesheet" href=" file " /> to the header.
21
22     -f file
23             Read from file instead of from the standard input.
24
25     -h, --help, -?
26             Print help for aha to the standard output.
27
28     -i X, --iso X
29             Use the ISO-8859-X character encoding instead of UTF-8 for the
30             output, where X is a number from 1-16.
31
32     -l, --line-fix
33             Use a fix for inputs using control sequences to change the cursor
34             position.  This is a hot fix, thus it may not work with every
35             program.
36
37     -L LANG, --lang LANG
38             Uses the ISO-639-1 code LANG for the language.
39
40     -n, --no-header
41             Do not enclose HTML output in <html>, <head> and <body> tags.
42
43     -p, --pink
44             Style HTML output to use a pink background.
45
46     -r, --ignore-cr
47             Ignore all carriage-returns (ASCII sign 13, \r) which may lead to
48             double new lines in html.
49
50     -s, --stylesheet
51             Use a stylesheet instead of inline styles.
52
53     -t TITLE, --title TITLE
54             Set the HTML document title to TITLE instead of "stdin" or the
55             filename.
56
57     -v, --version
58             Print version number of aha to the standard output and exit.
59
60     -w, --word-wrap
61             Wrap long lines in the html output.  Works with CSS3 supporting
62             browsers and many older ones.
63
64     -x, --no-xml
65             Don't use doctype xml but html (may useful for old browsers like
66             IE)
67
68     -y STYLE, --style STYLE
69             Sets the style used in the <body> element to STYLE after styles
70             set by other parameters.
71

EXAMPLES

73     Create an HTML file with a black background, a custom title and a larger
74     font-size using aha's help:
75
76           $ aha -h | aha -b -t 'the awesome aha help' -y 'font-size:1.875em'
77           > aha-help.html
78
79     Create an HTML file with a white background using the output of diff(1):
80
81           $ diff -u --color=always oldfile.c newfile.c | aha > diff.html
82
83     Create an HTML file with a black background from the output of htop(1).
84     You have to use option -l due the other new-line-commands htop uses:
85
86           $ echo q | htop | aha -b -l > htop.html
87
88     Create an HTML file from the output of this man page.  man(1) uses bold
89     and underline formatting from nroff(1), which ul(1) converts to SGR:
90
91           $ MAN_KEEP_FORMATTING=1 COLUMNS=80 man aha | ul | aha >
92           man-aha.html
93

SEE ALSO

95     console_codes(4)
96
97     Control Functions for Coded Character Sets, Ecma, ECMA-48, 61, 1991.
98

AUTHORS

100     The aha utility is maintained by Alexander Matthes ‘Ziz’
101     <ziz@mailbox.org>.
102

BUGS

104     Blinking text using the HTML tag <blink> and the css property
105     text-decoration:blink have been deprecated on modern browsers, thus
106     requiring the use of option -s and redefining the .blink css class.
107
108BSD                             August 4, 2020                             BSD
Impressum