sgftocsv.py
sgftocsv.py is a small Python script, that recursively goes through a directory, collecting some information from the sgf files and generates a csv file with that info.
Currently the following properties are collected:
- Path and Filename
- Black Player and Rank
- White Player and Rank
- Result
- Date the game was played
- Event
It is pretty easy to add more.
Here is what I did with it:
- Downloaded and extracted a game collection
- Ran the script over it to get the csv file
- Use
OpenOffice.org Spreadsheet to convert the file to a format easily readable by filemaker, a database frontend (this was necessary as I used ^ as the text delimiter, since " and ' seem to be used within the Event names occasionally; the cell delimiter is the semicolon)
- Imported the data into the database
- Created a very small script in file maker so I can open the files from within filemaker (it actually also saves the number of times I viewed the file as well as the last access date)
Now I have the powerful search features of SQL combined with my favourite SGF reader. This had to be done because all other tools I could find would not handle this many files properly (or in a decent amount of time). Jacoto for example just crashed. Kombilo was horribly slow (apart from the interface being rather... well it can hardly be called interface at all).
A small bottom note: I cannot recommend using the OpenOffice.org Base database. After openig the data in the spreadsheet it promises that marking all the data and drag/droping it into Base will create a database with that data (since there is no import feature). Well what happened is that I let it run for around 45 minutes and then I was fed up.
Since I really cant be bothered to host the script anywhere I will just put it up here. Copy/Paste and save as sgftocsv.py. Obviously you will need Python for it to work, so download it from their page. Also you need to enter the paths in the script itself (using \\ instead of \ on windows systems).
Enjoy studying ChrisP