-
Notifications
You must be signed in to change notification settings - Fork 2
/
ancient2pic
executable file
·53 lines (43 loc) · 2.15 KB
/
ancient2pic
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
#!/bin/sh
echo ".PS"
echo "# I want you to know I'm not proud of this."
echo ".ps 7"
echo ".vs 9"
echo "boxwid = 3/48"
echo "boxht = 0.05 * 12"
echo "moveht = 1/6 + 0.05"
printf '.ds o \\h!-0.015i!\\D!l 0.03i 0!\\D!l 0 -0.03i!\\D!l -0.03i 0!\\D!l 0 0.03i!\\h!0.015i!\\v!0.05i!\n'
printf '.ds . \\h!-0.01i!\\v!-0.015i!\\D!l 0.02i 0!\\h!-0.01i!\\v!0.015i!\\v!0.05i!\n'
printf '.ds u6 \\v!-0.05i*6u!\n'
printf '.ds u3 \\v!-0.05i*3u!\n'
tail -n +4 ibm-ancient |
sed 's/\(....\) \(............\) \(............\) \(......\) \(............\) \(......\) \(............\) \(............\) \(............\)/down|box invis ht moveht "\1"|box invis "\\*(u6\2"|move|box invis ht moveht "\1"|box invis "\\*(u6\3"|move|box invis ht moveht "\1"|box invis ht boxht\/2 "\\*(u3\4"|move|box invis ht moveht "\1"|box invis "\\*(u6\5"|move|box invis ht moveht "\1"|box invis ht boxht\/2 "\\*(u3\6"|move|box invis ht moveht "\1"|box invis "\\*(u6\7"|move|box invis ht moveht "\1"|box invis "\\*(u6\8"|move|box invis ht moveht "\1"|box invis "\\*(u6\9"|move up 7*boxht + 15*moveht|move right boxwid||/' | tr '|' '\012' |
sed 's/_/\\*./g' | sed 's/=/\\*o/g' | sed 's/\("[^ ]*\) *"/\1"/'
echo ".ps 9"
echo "move left 25*boxwid"
echo "down"
echo "move moveht"
echo "move boxht"
echo 'box ht moveht invis "a. James W. Bryce, March 23, 1925 (October 4, 1932)"'
echo 'move moveht'
echo 'move boxht'
echo 'box ht moveht invis "b. Peter Dech\(`ene, November 27, 1929 (March 21, 1933)"'
echo 'move moveht'
echo 'move boxht/2'
echo 'box ht moveht invis "c. John R. Peirce, April 7, 1930 (July 12, 1932)"'
echo 'move moveht'
echo 'move boxht'
echo 'box ht moveht invis "d. James W. Bryce, August 28, 1930 (September 12, 1933)"'
echo 'move moveht'
echo 'move boxht/2'
echo 'box ht moveht invis "e. John R. Peirce, January 14, 1931 (February 7, 1933)"'
echo 'move moveht'
echo 'move boxht'
echo 'box ht moveht invis "f. Gustav Tauschek, September 6, 1933 (August 6, 1935)"'
echo 'move moveht'
echo 'move boxht'
echo 'box ht moveht invis "g. F. M. Carroll, December 20, 1932 (November 27, 1934)"'
echo 'move moveht'
echo 'move boxht'
echo 'box ht moveht invis "h. Albert W. Mills, September 24, 1932 (October 8, 1935)"'
echo ".PE"