Merge branch 'master' of https://github.com/fat0troll/lorchess
This commit is contained in:
commit
db0bdb9da2
@ -218,6 +218,11 @@
|
|||||||
black: Genuine
|
black: Genuine
|
||||||
result: '0:1'
|
result: '0:1'
|
||||||
|
|
||||||
|
- date: 19.10.2013
|
||||||
|
white: Nokman
|
||||||
|
black: Magian
|
||||||
|
result: '0:1'
|
||||||
|
|
||||||
- date: 23.09.2013
|
- date: 23.09.2013
|
||||||
white: shell-script
|
white: shell-script
|
||||||
black: redgremlin
|
black: redgremlin
|
||||||
@ -235,6 +240,11 @@
|
|||||||
black: shell-script
|
black: shell-script
|
||||||
result: '1:0'
|
result: '1:0'
|
||||||
|
|
||||||
|
- date: 19.10.2013
|
||||||
|
white: Genuine
|
||||||
|
black: Nokman
|
||||||
|
result: '1:0'
|
||||||
|
|
||||||
- date: 27.09.2013
|
- date: 27.09.2013
|
||||||
white: LongLiveUbuntu
|
white: LongLiveUbuntu
|
||||||
black: Nedis
|
black: Nedis
|
||||||
@ -381,6 +391,11 @@
|
|||||||
black: DoctorSinus
|
black: DoctorSinus
|
||||||
result: '1:0'
|
result: '1:0'
|
||||||
|
|
||||||
|
- date: 19.10.2013
|
||||||
|
white: Nedis
|
||||||
|
black: farzeet
|
||||||
|
result: '1:0'
|
||||||
|
|
||||||
- date: 05.10.2013
|
- date: 05.10.2013
|
||||||
white: Nokman
|
white: Nokman
|
||||||
black: uroboros
|
black: uroboros
|
||||||
@ -403,6 +418,11 @@
|
|||||||
black: Magian
|
black: Magian
|
||||||
result: '0:1'
|
result: '0:1'
|
||||||
|
|
||||||
|
- date: 12.10.2013
|
||||||
|
white: raven_cler
|
||||||
|
black: redgremlin
|
||||||
|
result: '0:1'
|
||||||
|
|
||||||
- date: 04.10.2013
|
- date: 04.10.2013
|
||||||
white: uroboros
|
white: uroboros
|
||||||
black: shell-script
|
black: shell-script
|
||||||
@ -521,3 +541,8 @@
|
|||||||
black: LongLiveUbuntu
|
black: LongLiveUbuntu
|
||||||
result: '0:1'
|
result: '0:1'
|
||||||
|
|
||||||
|
- date: 19.10.2013
|
||||||
|
white: aptyp
|
||||||
|
black: Nokman
|
||||||
|
result: '1:0'
|
||||||
|
|
||||||
|
28
schedule
28
schedule
@ -49,16 +49,20 @@ shift
|
|||||||
|
|
||||||
# Generate the sequence of tours to search in
|
# Generate the sequence of tours to search in
|
||||||
if [[ -z "$@" ]]; then
|
if [[ -z "$@" ]]; then
|
||||||
tours=$(seq -f "%02g" 1 99)
|
seq=$(seq -f "%02g" 1 99)
|
||||||
else
|
else
|
||||||
# Change tour numbers: '1' -> '01', '2' -> '02', and so on
|
# Change tour numbers: '1' -> '01', '2' -> '02', and so on
|
||||||
tours=$(for tour in "$@"; do printf "%02g " $tour; done)
|
seq=$(for i in "$@"; do printf "%02g " "$i"; done)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for tour in $tours; do
|
for i in $seq; do
|
||||||
|
|
||||||
# Store 'tour_info' in an array of lines
|
url="https://raw.github.com/${REPO}/master/${TOURNEY}/tour_${i}/tour_info"
|
||||||
url=https://raw.github.com/$REPO/master/$TOURNEY/tour_$tour/tour_info
|
|
||||||
|
# Store 'tour_info' in an array of lines.
|
||||||
|
# *NOTE* The incorporation of newline at the end of 'tour_info'
|
||||||
|
# (--write-out '\n') is important and allows one to read the last
|
||||||
|
# line without trailing '\n'
|
||||||
lines=()
|
lines=()
|
||||||
while read line; do
|
while read line; do
|
||||||
lines+=("$line")
|
lines+=("$line")
|
||||||
@ -69,8 +73,8 @@ for tour in $tours; do
|
|||||||
|
|
||||||
# Decide to skip the tour or not
|
# Decide to skip the tour or not
|
||||||
unskip=""; player=""
|
unskip=""; player=""
|
||||||
for ((i=5; i<${#lines[@]}; ++i)); do
|
for ((j=5; j<${#lines[@]}; ++j)); do
|
||||||
line="${lines[$i]}"
|
line="${lines[$j]}"
|
||||||
|
|
||||||
# Don't skip if an unfinished game exists
|
# Don't skip if an unfinished game exists
|
||||||
if [[ -z $(grep "$result" <<< "$line") ]]; then
|
if [[ -z $(grep "$result" <<< "$line") ]]; then
|
||||||
@ -79,7 +83,7 @@ for tour in $tours; do
|
|||||||
|
|
||||||
# In addition, if the player was passed as an
|
# In addition, if the player was passed as an
|
||||||
# argument, check if this is his game or not
|
# argument, check if this is his game or not
|
||||||
elif [[ -n $(grep -o "[^ ]*${name}[^ ]*" <<< "$line") ]]; then
|
elif [[ -n $(grep -o "$name" <<< "$line") ]]; then
|
||||||
unskip="yes"
|
unskip="yes"
|
||||||
# Complete player's name
|
# Complete player's name
|
||||||
player=$(grep -o "[^ ]*${name}[^ ]*" <<< "$line")
|
player=$(grep -o "[^ ]*${name}[^ ]*" <<< "$line")
|
||||||
@ -91,15 +95,15 @@ for tour in $tours; do
|
|||||||
|
|
||||||
# The separator between tours
|
# The separator between tours
|
||||||
echo -en "$yellow"
|
echo -en "$yellow"
|
||||||
for i in {1..41}; do echo -n "-"; done
|
for j in {1..41}; do echo -n "-"; done
|
||||||
echo -e "$restore"
|
echo -e "$restore"
|
||||||
|
|
||||||
# Output the tour heading as is
|
# Output the tour heading as is
|
||||||
for ((i=0; i<5; ++i)); do highlight "${lines[$i]}"; done
|
for ((j=0; j<5; ++j)); do highlight "${lines[$j]}"; done
|
||||||
|
|
||||||
# Lines with game info
|
# Lines with game info
|
||||||
for ((i=5; i<${#lines[@]}; ++i)); do
|
for ((j=5; j<${#lines[@]}; ++j)); do
|
||||||
line="${lines[$i]}"
|
line="${lines[$j]}"
|
||||||
|
|
||||||
# Output only unfinished games
|
# Output only unfinished games
|
||||||
if [[ -z $(grep "$result" <<< "$line") ]]; then
|
if [[ -z $(grep "$result" <<< "$line") ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user