Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/node_modules/
/tcec-chess.com/node_modules/
/tcec-chess.com/package-lock.json
*.swp
*~
*.tmp
*.log
/package-lock.json
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ TCEC GUI
This is the code that powers the
[tcec-chess.com](http://tcec-chess.com/) website.

Setting up a development environment
------------------------------------

1. Git clone --> `$TCECGUI`
2. Run `$TCECGUI/scripts/setup-development.sh`. This does the following:
* `npm install` to download node_modules packages in tcecgui/tcec-chess.com/
* Runs `$TCECGUI/scripts/download-tcec-live-files-for-testing.sh` to download live files from the TCEC server
3. Run `$TCECGUI/scripts/start-tcec-chess-live-update.sh` to launch the live update server (CTRL+C to stop)
4. Point your browser to `$TCECGUI/tcec-chess.com/live.html`

This section is incomplete.


Licence
Expand Down
9 changes: 9 additions & 0 deletions scripts/clean-tcec-live-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

cd "$(dirname $0)/../tcec-chess.com"

source ../scripts/tcec-live-files.inc.sh

rm -v -f $livefiles
30 changes: 30 additions & 0 deletions scripts/download-tcec-live-files-for-testing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -e

cd "$(dirname $0)/../tcec-chess.com"

source ../scripts/tcec-live-files.inc.sh

# backup live files if any exist
livefiles_exist=

for file in $livefiles
do
if [ -f $file ]
then
livefiles_exist=1
fi
done

if [ $livefiles_exist ]
then
backup="/tmp/tcec-live-backup.tar.xz"
echo "Backing up live files to $backup"
tar cfJ "$backup" --ignore-failed-read $livefiles
fi

# create curl args and run curl
echo "$livefiles" | sed -r -e 's/[[:space:]]+/ /g' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | tr ' ' '\n' |
sed -r 's@(.*)@-o \1 https://tcec-chess.com/\1@' |
xargs curl --create-dirs --parallel-max 10 --parallel
8 changes: 8 additions & 0 deletions scripts/setup-development.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e

cd "$(dirname $0)/../tcec-chess.com"
npm install

../scripts/download-tcec-live-files-for-testing.sh
6 changes: 6 additions & 0 deletions scripts/start-tcec-chess-live-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e

cd "$(dirname $0)/../tcec-chess.com"
node cluster.js --port 8080
6 changes: 6 additions & 0 deletions scripts/tcec-live-files.inc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
livefiles="Eventcrosstable.json crosstable.json data1.json gamelist.json
liveengineeval.json liveeval1.json schedule.json winners.json
crash.json data.json enginerating.json live.json liveeval.json
load.json tournament.json
evalbotelo/live.pgn evalbotelo/schedule.txt
evalbotelo/archive.pgn evalbotelo/crosstable.txt"
2 changes: 0 additions & 2 deletions start.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading