From e9f2bafcdc204135ec736820320d7e9d8ab5118c Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Wed, 24 Sep 2025 20:25:15 +0200 Subject: [PATCH] Done --- .gitignore | 3 + .../jeudego/pairgoth/api/StandingsHandler.kt | 2 +- build.sh | 23 ++++++ .../src/main/webapp/result-sheets.html | 77 +++++++------------ .../src/main/webapp/tour-results.inc.html | 6 +- 5 files changed, 56 insertions(+), 55 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/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..0248295 --- /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 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -Dpairgoth.mode=standalone -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..f64d18b 100644 --- a/view-webapp/src/main/webapp/result-sheets.html +++ b/view-webapp/src/main/webapp/result-sheets.html @@ -1,4 +1,3 @@ -#macro(rank $rank)#if( $rank<0 )#set( $k = -$rank )${k}k#else#set( $d=$rank+1 )${d}d#end#end #if (!$tour)

Invalid tournament id

@@ -28,60 +27,36 @@ #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 + +
TableBlackWhiteHandicapKomi
Table $table$black.name $!black.firstname$white.name $!white.firstname$game.h$komi
+