jkex...@comcast.net wrote:
> I am interested in automating updates to my SCID databases (ie: 
> chesspuzzles.si4) and I haven't had any luck finding program coding 
> notes regarding how to read SCID's *.si4 data format; and append it.
I do not know if Shane ever wrote a formal document describing it.
There are 3 files:
- the file with extensions .si4 is the index, and it contains a 
fixed-length header and fixed-length records for each game.
Have a look at function Index::WriteHeader ( 
https://sourceforge.net/p/scid/code/ci/master/tree/src/index.cpp )
and at functionIndexEntry::Write ( 
https://sourceforge.net/p/scid/code/ci/master/tree/src/indexentry.h#l582 )
- the file with extensions .sn4 contains the names of the players, 
events, sites and rounds. Look at function NameBase::WriteNameFile ( 
https://sourceforge.net/p/scid/code/ci/master/tree/src/namebase.cpp#l203 )
- the file with extensions .sg4 contains the games. This is more 
complex. Start with function Game::Encode ( 
https://sourceforge.net/p/scid/code/ci/master/tree/src/game.cpp#l3703 )
> I scour the web for puzzles and currently create FENs in a text file, 
> which I manually import into SCID.
> I'm interested in automating this process
If you write the text file using the pgn format, it is possible to use a 
script ( 
https://sourceforge.net/p/scid/code/ci/master/tree/scripts/sc_import.tcl 
) to append the games into a Scid database:
./tkscid sc_import.tcl scid_db puzzle.pgn

Hope it helps,
Fulvio

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Scid-users mailing list
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users

Reply via email to