bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] Python script and XG/XGP file formats


From: Michael Petch
Subject: [Bug-gnubg] Python script and XG/XGP file formats
Date: Wed, 01 Jan 2014 00:11:31 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Happy New Year everyone,

I happened to revive an old project from a couple years ago that was
reverse engineering parts of the XG file format to extract some data. I
contacted Xavier about what might have been a bug, and he passed along
the file structure.

I am currently developing a Python library and tool to decompress the
file and extract the data. Although not finished, the tool does extract
all the game data(moves and cubes) and rollout data. The library
organization needs to be cleaned up.

The xgextractdata.py debug tool extracts all the main data file elements
and writes them to individual files to test the library. The code will
also dump a textual representation to the console.

Although the code itself will dump a textual representation of the data,
it isn't incredibly useful by itself. I created this project to provide
myself a reference library for implementation in other languages.
Although Xavier supplied the data structures, I had discovered
discrepancies in the information and helped him correct it. Thanks to
Xavier for releasing the data structures. He will be making them
available to everyone in the next little while.

The code isn't quite complete as some test code needs to be moved to the
import library as proper class methods. The extraction tool needs a few
more useful command line arguments as well. Over the next few days I'll
look at correcting those deficiencies.

The code should run on most platforms with Python 2.7 or greater. It
could be easily modified to support version < 2.6. Consider it a work in
progress.

The project is available under the GPLv3 license on my server at:

http://vcs.capp-sysware.com/gitweb/?p=backgammon/xgdatatools.git;a=summary

You can also clone the git repository via:

git clone git://vcs.capp-sysware.com/backgammon/xgdatatools.git

Take care,
-- 
Michael Petch
CApp::Sysware Consulting Ltd.
OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304



reply via email to

[Prev in Thread] Current Thread [Next in Thread]