Skip to content

Commit f2ceb02

Browse files
committed
updated
1 parent 0272692 commit f2ceb02

File tree

1 file changed

+62
-26
lines changed

1 file changed

+62
-26
lines changed

README.txt

Lines changed: 62 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,91 @@
1-
==========================================
2-
Go Tools: Smart Game Format Parser Library
3-
==========================================
1+
======================================================
2+
sgflib: Smart Game Format Parser Library & Utilities
3+
======================================================
44

55
Description
66
===========
77

88
For Python programmers, sgflib.py is a module containing a parser and classes
9-
for SGF, the Smart Game Format. Also included is the module typelib.py, which
10-
emulates Python built-in data types as classes.
9+
for SGF, the Smart Game Format, specifically for the game of Go.
10+
11+
For Go players, several utilities are included:
12+
13+
* sgfmerge: Merge two or more game record files into one. Works best
14+
when the game record files are for the same game, and contain
15+
variations.
16+
17+
* sgfnorm: Normalize an SGF file. Usful for comparing two files
18+
representing the same game.
19+
20+
* sgfsummary: Read, analyze, and summarize one or more SGF files.
21+
1122

1223
Installation
1324
============
1425

15-
Please note that sgflib.py and typelib.py are included as part of the
16-
sgfsummary.py download, so you need not download them separately. Although these
17-
modules are only useful to Python programmers, if you're not one, I encourage
18-
you to take a look. Python is a cool programming language.
26+
You'll need the Python language itself, version 3.8 or higher, freely
27+
available from http://www.python.org.
1928

20-
You'll need the Python language itself, freely available from
21-
[[http://www.python.org]].
22-
23-
The sgflib.tgz (tarred, gzipped) archive contains the following:
29+
The sgflib.tgz archive contains the following:
2430

2531
- sgflib.py -- SGF Parser Library. Put this in a folder on Python's path.
2632

27-
- typelib.py -- Type Class Library. Put this in a folder on Python's path.
33+
- sgfsummary, sgfnorm, sgfmerge -- Utility tools. Put these on your PATH.
2834

2935
- README.txt -- Installation instructions (the file you're reading now).
3036

31-
- lgpl.txt -- The GNU Lesser General Public License; applies to sgflib.py.
37+
- test_sgflib.py & test_data/ -- Test suite. Requires pytest to run.
38+
39+
40+
Bugs & Other Issues
41+
===================
3242

33-
I have only tested this code on my system, MacOS 8.6, running Python 1.5.2. I
34-
did try to write it to be platform-independent. If you have any trouble running
35-
it, find (fix?) any bugs, or add any features, please contact me.
43+
If you have any trouble running this code, if you find (maybe fix?)
44+
any bugs, or add any features, please contact_ the author.
3645

37-
MacOS users: please see the Macintosh Python Notes and the Macintosh SGF Notes
38-
at [[http://gotools.sourceforge.net]].
3946

4047
To Do
4148
=====
4249

43-
There's nothing on my list for sgflib.py right now.
50+
* Reimplement the GameTree as a data structure that's convenient for
51+
the user of sgflib, rather than following the file format.
52+
53+
* Reimplement the Cursor class? Or remove it altogether if unnecessary.
54+
55+
* Reimplement the parser?
4456

45-
typelib.py:
57+
* Simplify. It works, but it seems clunky. Written early in my
58+
Python career.
4659

47-
- Implement 'Function'? 'File'? (Have to come up with a good reason first ;-)
60+
* Reimplement as a generator?
61+
62+
* Support earlier versions of SGF?
63+
64+
* Titler: Populate the title (GN/game_name property) inside the SGF
65+
file itself, e.g.:
66+
67+
player1 (2 dan, white) vs player2 (4 kyu, black +h5); W+18½; KGS; 2020-12-04
68+
69+
* Renamer: Rename SGF files, e.g.:
70+
71+
2020-12-04 player1 · player2 +h5 W+18.sgf
72+
73+
* Query SGF data: Extract game & node properties & comments from .sgf
74+
files. Queries could be Python expressions for maximum flexibility.
75+
76+
* Handicap convertor? Lizzie (Leela Zero?) can't handle handicap
77+
stones, so this program would convert the HA[n] & AB[xx] tags to
78+
B[xx] moves & W[] passes. Katago via KaTrain doesn't have this
79+
problem though.
80+
81+
* Auto-label variations.
82+
83+
Have any suggestions? Want to help? Please contact_ the author.
4884

49-
Have any suggestions? Want to help? Let me know!
5085

5186
Contact
5287
=======
5388

54-
Project administrator: David Goodger [[mailto:[email protected]]]
55-
Go Tools Project website: [[http://gotools.sourceforge.net]]
89+
Project author: `David Goodger <mailto:[email protected]>`_.
90+
91+
Go Tools Project website: http://gotools.sourceforge.net.

0 commit comments

Comments
 (0)