mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-06 01:56:28 +02:00
Add the lichess chess-openings database
This commit is contained in:
parent
79cf6b2634
commit
b7667d1d40
2 changed files with 28335 additions and 0 deletions
28302
src/binres/openings.hpp
Normal file
28302
src/binres/openings.hpp
Normal file
File diff suppressed because it is too large
Load diff
33
tools/openings.sh
Executable file
33
tools/openings.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
# OChess is using the lichess chess-openings database
|
||||
# that can be found here: https://github.com/lichess-org/chess-openings
|
||||
|
||||
# Init variables
|
||||
urldb="https://github.com/lichess-org/chess-openings"
|
||||
tmp=$(mktemp -d)
|
||||
wai=$(dirname $(readlink -f "$0")) # Current script directory
|
||||
dst="${wai}/../src/binres/"
|
||||
|
||||
# Fetch database
|
||||
git clone "$urldb" "$tmp"
|
||||
|
||||
# Generate c_str from database
|
||||
cd $tmp
|
||||
wxbin2c a.tsv a_tsv.hpp
|
||||
wxbin2c b.tsv b_tsv.hpp
|
||||
wxbin2c c.tsv c_tsv.hpp
|
||||
wxbin2c d.tsv d_tsv.hpp
|
||||
wxbin2c e.tsv e_tsv.hpp
|
||||
|
||||
# Combine c_str files
|
||||
cat a_tsv.hpp > openings.hpp
|
||||
cat b_tsv.hpp >> openings.hpp
|
||||
cat c_tsv.hpp >> openings.hpp
|
||||
cat d_tsv.hpp >> openings.hpp
|
||||
cat e_tsv.hpp >> openings.hpp
|
||||
|
||||
# Save
|
||||
mv openings.hpp "$dst"
|
||||
|
||||
# Cleaning
|
||||
rm -rf "$tmp"
|
Loading…
Add table
Reference in a new issue