blob: 0a3bd127906d2c2ef31175872ae23d0aafb0bf99 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
.Dd October 18, 2021
.Dt SHOTTY 1
.Os
.
.Sh NAME
.Nm shotty
.Nd HTML terminal renderer
.
.Sh SYNOPSIS
.Nm
.Op Fl Bdins
.Op Fl b Ar bg
.Op Fl f Ar fg
.Op Fl h Ar rows
.Op Fl w Ar cols
.Op Ar file
.
.Sh DESCRIPTION
.Nm
renders a terminal session
captured with
.Xr ptee 1
or
.Xr script 1
from
.Ar file
or standard input
and renders one or more HTML snapshots.
One snapshot is rendered
for each media copy sequence,
or a single snapshot is rendered
at the end of the session.
.Nm
targets compatibility with
.Ev TERM=xterm
and
.Ev TERM=xterm-256color
as used by
.Xr ncurses 3 .
.
.Pp
HTML output uses
.Sy bg Ns Va n
and
.Sy fg Ns Va n
classes for colors,
and inline styles for
bold, italic and underline.
CSS for colors
can be generated by
.Xr scheme 1 .
.
.Pp
The arguments are as follows:
.Bl -tag -width "-w cols"
.It Fl B
Replace bold with bright colors.
.
.It Fl b Ar bg
Set the default background color.
The default is 0 (black).
.
.It Fl d
Render a snapshot
after each control sequence.
.
.It Fl f Ar fg
Set the default foreground color.
The default is 7 (white).
.
.It Fl h Ar rows
Set the terminal height.
The default is 24.
.
.It Fl i
Output inline color attributes.
.
.It Fl n
Hide the cursor.
.
.It Fl s
Copy the terminal size
from the current terminal.
.
.It Fl w Ar cols
Set the terminal width.
The default is 80.
.El
.
.Sh EXAMPLES
.Dl $ ptee htop | shotty -Bis >htop.html
.
.Sh SEE ALSO
.Xr ptee 1 ,
.Xr script 1
.
.Sh STANDARDS
.Bl -item
.It
.Rs
.%A Thomas Dickey
.%A Stephen Gildea
.%A Edward Moy
.%T XTerm Control Sequences
.%U https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
.Re
.It
.Rs
.%A F. Yergeau
.%T UTF-8
.%R RFC 2044
.%U https://tools.ietf.org/html/rfc2044
.%D October 1996
.Re
.El
|