home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
ca2pgn2.zip
/
CA2PGN.DOC
next >
Wrap
Text File
|
1996-05-27
|
4KB
|
76 lines
CA2PGN Version 0.2 (May 1996)
This is a zero version of the CA to PGN converter. The program converts
the Big Seven Tags only (Event, Site, Round, White, Black, Year, Result and
game score of course). I have chosen the following correspondence between CA and
PGN fields:
CA PGN
Place => Site
Class => Event
White => White (surprise, surprise)
Black => Black
Year => Year
Score => Result
Game# => Round
This choice contradicts slightly to that of the CA team, since PGN2CA converts
Event => Place and ignores the Site field at all.
Syntax:
ca2pgn [-r range] [-i] [-m max_er] [-e er_base] filename.bfi
where
"-r range" specifies a range of games to be converted. By default all the
database will be converted.
"-i" tells the program to ignore the conversion errors and continue
the conversion. This option does not apply to file read/write errors.
Those errors will stop the program in any circumstances.
"-m max_er" specifies a maximal number of errors in a game before the program
gives up its conversion. Default value is 10. Some of the errors are
considered fatal, and conversion of the game stops before the maximum
number has been reached.
"--E er_base" specifies a database where all erroneous games will be extracted to.
The .bfi extension is mandatory in the base name.
The program will create a PGN file filename.pgn, it means that the PGN
file will be created in the same directory where CA files are placed. If there
was a PGN file with the same name, it will be overwritten.
I have assumed that all the games in a database are valid, and programs does
not check the games for validity. Unfortunately, my assumption is not valid
itself, and you can run into a case when a back conversion (PGN => CA) fails.
It happens for example with the base all0394a from Internet Chess Library.
I have tested the program on circa 150 000 CA games I got a hold on. I can
assure that after a back and forth conversion (CA => PGN => CA) the game scores
were absolutely identical (whenever this back and forth conversion was possible).
But it is the only assurance I can give. As one can guess I have received no
support from the CA team (I did not ask for it either). It means that my
knowledge of the CA file formats is limited. For example, I do not know what
would happen, if LIB file is too big. I have assumed that any component of the
lib file (PlayerName, Place, Class, OpenningName, Annotator) takes less than
1 M (1,047,553 to be precise). It is quite possible that this number is due
to the bug in the PGN to CA converter, rather than an internal CA limit. Anyway,
if somebody has such a big database, I would be very grateful if you
test the program with the database (just run it for a small range of games and
program will tell you right away if your database is actually big :-) ).
The converter does not keep a log, but you can easily redirect all the
messages to a file. For example:
ca2pgn -i -e err_base.bfi my_base.bfi > my_base.log
Any bug reports are welcome. Please, send your comments and bug reports to
nikulin@ee.umanitoba.ca. To make the things easier to me, please run the program
with "-i -e err_base" options and include err_base (14 files :-) ) in your bug
report.
I will release the source code as soon as I comb it and make it UNIX compatible.
Hopefully you will find the program useful.
Alexander Nikulin.