From 320206118aac8f282d4eaef13f8af90da32a2a52 Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Wed, 8 Oct 2025 20:14:20 +0200 Subject: [PATCH] Done --- .gitignore | 3 + README.md | 2 + .../jeudego/pairgoth/api/StandingsHandler.kt | 2 +- build.sh | 23 ++++++ .../src/main/webapp/result-sheets.html | 80 +++++++------------ .../src/main/webapp/tour-results.inc.html | 6 +- 6 files changed, 62 insertions(+), 54 deletions(-) create mode 100755 build.sh diff --git a/.gitignore b/.gitignore index 40238cc..3a72085 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ target *.iml *~ pairgoth.db +ratings +pairgoth +pairgoth.tar.gz \ No newline at end of file diff --git a/README.md b/README.md index ca3c84c..8234e27 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# This is largely a mirror of the original, adapted for the Slovenian Go Association. + # Pairgoth Welcome to Pairgoth, your Go Pairing Engine! diff --git a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt index fa3e400..8fa4ad0 100644 --- a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt +++ b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/StandingsHandler.kt @@ -132,7 +132,7 @@ ${ player.getString("num")!!.padStart(4, ' ') } ${ "${ - player.getString("name")?.toSnake(true) + player.getString("name")?.toSnake() } ${ player.getString("firstname")?.toSnake() ?: "" diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5b28106 --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +mkdir pairgoth +cp application/target/pairgoth-engine.jar pairgoth/ + +echo "#!/bin/bash" > pairgoth/run.sh +echo "./jdk-11.0.28+6-jre/bin/java -jar pairgoth-engine.jar" >> pairgoth/run.sh + +echo "#!/bin/bash" > pairgoth/get_java.sh +echo "wget https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.28%2B6/OpenJDK11U-jre_x64_linux_hotspot_11.0.28_6.tar.gz" >> pairgoth/get_java.sh +echo "tar -xzf OpenJDK11U-jre_x64_linux_hotspot_11.0.28_6.tar.gz" >> pairgoth/get_java.sh + +chmod +x pairgoth/run.sh +chmod +x pairgoth/get_java.sh + + +echo "" > pairgoth/pairgoth.properties +echo "webapp.env = prod" >> pairgoth/pairgoth.properties +echo "webapp.url = http://localhost:8080" >> pairgoth/pairgoth.properties +echo "auth = none" >> pairgoth/pairgoth.properties +echo "logger.level = info" >> pairgoth/pairgoth.properties +echo "rating.ffg.enable = false" >> pairgoth/pairgoth.properties +echo "webapp.protocol = http" >> pairgoth/pairgoth.properties + +tar -czvf pairgoth.tar.gz pairgoth/ \ No newline at end of file diff --git a/view-webapp/src/main/webapp/result-sheets.html b/view-webapp/src/main/webapp/result-sheets.html index 966c119..162287a 100644 --- a/view-webapp/src/main/webapp/result-sheets.html +++ b/view-webapp/src/main/webapp/result-sheets.html @@ -28,60 +28,40 @@ #stop #end #set($games = $utils.removeBye($roundPairing.games)) -#set($pages = ($games.size() + 3) / 4) -#set($items = $pages * 4) -#foreach($i in [1..$items]) - #set($j = ($i - 1) / 4 + (($i - 1) % 4) * $pages) - #if($j < $games.size()) - #set($game = $games[$j]) - #set($white = $pmap[$game.w]) - #set($black = $pmap[$game.b]) - #else - #set($game = { 't': 'xxx', 'h': 'xxx' }) - #set($white = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) - #set($black = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) - #end - #if($foreach.index % 4 == 0) -
- #end -
-
$tour.name
-
-
-
Table $game.t
+ + + + + + + + + + + +#set($numOfPlay = $games.size() - 1) +#foreach($i in [0..$numOfPlay]) + + #set($game = $games[$i]) + #set($white = $pmap[$game.w]) + #set($black = $pmap[$game.b]) #set($komi = $tour.komi) #if($game.h) #set($komi = $komi - $math.floor($komi)) #end -
Handicap $game.h  ‐  Komi $komi
-
Round $round
- -
- Surround winner's name or ½-½ -
-
-
-
White
-
$white.name $!white.firstname #rank($white.rank)
#if($white.country)($white.country.toUpperCase()#if($white.club), $white.club#end)#end
-##
$white.egf
-
-
½-½
-
-
Black
-
$black.name $!black.firstname #rank($black.rank)
#if($black.country)($black.country.toUpperCase()#if($black.club), $black.club#end)#end
-##
$black.egf
-
-
-
-
Signature:
-
   
-
Signature:
-
- - - #if($foreach.index % 4 == 3) - - #end + #set($table = $i + 1) + + + + + + + + + #end + +
TableBlackRankWhiteRankHandicapKomi
Table $table$black.name $!black.firstname#rank($black.rank)$white.name $!white.firstname#rank($white.rank)$game.h$komi
+