From 08ea6f590ceee0551fdca4f0f3a02d807660528a Mon Sep 17 00:00:00 2001 From: vonavi Date: Sun, 20 Apr 2014 22:11:22 +0400 Subject: [PATCH] Script 'schedule': don't highlight output in 'html' and 'lor' formats. --- schedule | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/schedule b/schedule index 10a0e5d..a7b82d4 100755 --- a/schedule +++ b/schedule @@ -203,19 +203,8 @@ info_output_lor() { echo -en "$1" | while read white black result url; do [[ -n "$url" ]] && result="[url=${url}]${result}[/url]" - local line=" [*] [user]${white}[/user] - [user]${black}[/user] ${result}" - # Highlight player's name - if [[ -n "$PLAYER" ]]; then - players=$(grep -o "\\[user\\][^ ]*${PLAYER}[^ ]*\\[/user\\]" <<< "$line") - # Escape symbols ']', '[', and '/' - players=$(sed 's/[][\/]/\\\0/g' <<< "$players") - for name in $players; do - line=$(sed "s/${name}/[b]\0[\\/b]/g" <<< "$line") - done - fi - - echo "$line" + echo " [*] [user]${white}[/user] - [user]${black}[/user] ${result}" done echo "[/list]" @@ -234,12 +223,6 @@ info_output_html() { echo -en "$1" | while read white black result url; do [[ -n "$url" ]] && result="${result}" - # Highlight player's name - if [[ -n "$PLAYER" ]]; then - [[ "$white" =~ $PLAYER ]] && white="${white}" - [[ "$black" =~ $PLAYER ]] && black="${black}" - fi - echo " " echo " ${white} - ${black}${result}" echo " "