blob: dd80c65b64a943ee2b9f30d7a0ee93e55b957ada (
plain)
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
|
.TH piechart 1 2026-04-12 utils
.SH NAME
piechart \- turn a list into a piechart
.SH SYNOPSIS
.SY piechart
.RI [ file ]
.YS
.SH DESCRIPTION
.B piechart
is an
.BR awk (1)
script that reads a list,
either from
.BR stdin (3)
or from a specified file,
and prints out a piechart in
SVG format.
.P
The input format is simply a list, one entry per line,
starting with a number, followed by a label.
If the number is negative, it is understood to be a subset of the previous non-negative number.
Consecutive negative numbers accumulate.
.P
Lines not starting with a number are ignored.
(Actually they are preserved as comments, but they are not visible in the graphic.)
.SH OPTIONS
.B piechart
has no options.
This may change in the future.
.SH EXIT STATUS
No exit status is explicitly defined.
.SH NOTES
.B piechart
is an
.BR awk (1)
script.
There is also a slightly more elegant
(and more correct)
but regrettably less readable implementation in C.
.P
Currently,
.B piechart
only renders a circular piechart.
Pseudo-3D and shadows are not implemented.
.SH BUGS
Comment entries are preserved out of order.
.SH EXAMPLES
.TP
.BI piechart\ data\ |\ display
Render the data in a
.BR display (1)
window.
.TP
.BI piechart\ <\ data\ >\ data.svg
Filter data into a graphics file.
.SH SEE ALSO
.BR awk (1)
|