How to update/append SCID (*.si4) database via VB/python programming?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to update/append SCID (*.si4) database via VB/python programming?

jkexcel
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.

Has anyone tried to programmically update/append their SCID databases? Can anyone point to a webpage that can help me read a *.si4 file?

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 and I'm interested to find resources (webpages) that show me how to programmically append a SCID database *.si4
I would only be entering the following basic information for each chess puzzle: Event, Site, Date, Event Date, Round, White, Black, FEN



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/scid-users
Reply | Threaded
Open this post in threaded view
|

Re: How to update/append SCID (*.si4) database via VB/python programming?

Fulvio
[hidden email] 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/scid-users