projects
/
gnushogi.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Remove excessive boilerplate duplication from dspwrappers.
[gnushogi.git]
/
doc
/
make_fig2
1
#! /usr/bin/env python
2
3
import sys, re
4
5
key = "three-mover. Here is a really trivial three-mover:"
6
7
replace = """
8
three-mover. Here is a really trivial three-mover:
9
<P>
10
<PRE>
11
12
3 2 1
13
----------------+
14
| | | | a
15
----------------+
16
| | | wK | b
17
----------------+
18
| | | | c
19
----------------+
20
| bN | | | d
21
----------------+
22
| | | | e
23
----------------+
24
| | bN | | f
25
----------------+
26
27
Black in hand: S, G
28
29
</PRE>
30
"""
31
32
#
33
# Insert the figure directly into the html file.
34
#
35
36
done = 0
37
38
while 1:
39
line = sys.stdin.readline()
40
if not line:
41
break
42
43
if not done:
44
match = re.match(key, line)
45
if match:
46
print replace,
47
done = 1
48
else:
49
print line,
50
else:
51
print line,
52
53