Add Indian health advices to annna. - annna - Annna the nice friendly bot.
 (HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
       ---
 (DIR) commit 534ef3a195849b6e8e028c9c2dd0d4c71748d3ab
 (DIR) parent 4f0b35ad38216a7c4a80f9148704ad3e118535bb
 (HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
       Date:   Sun, 27 Nov 2022 14:02:20 +0100
       
       Add Indian health advices to annna.
       
       Diffstat:
         M annna-message-common                |       7 +++++++
         A health-advice                       |      13 +++++++++++++
       
       2 files changed, 20 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/annna-message-common b/annna-message-common
       @@ -841,6 +841,13 @@ case "${text}" in
        "${ircuser}, sudo please make me a sandwich"*)
                annna-say -s "${server}" -c "${channel}" "Here is your sandwich."
                ;;
       +"${ircuser}, I feel unsure about my health.")
       +        healthadvice="$(health-advice)"
       +        if [ -n "${healthadvice}" ];
       +        then
       +                annna-say -s "${server}" -c "${channel}" "${user}, ${healthadvice}"
       +        fi
       +        ;;
        "${ircuser}, bonjour !")
                annna-say -s "${server}" -c "${channel}" "${user}, bonjour !"
                ;;
 (DIR) diff --git a/health-advice b/health-advice
       @@ -0,0 +1,13 @@
       +#!/bin/sh
       +
       +healthuri="https://www.aryavaidyasala.com/"
       +
       +curl -s $healthuri \
       +        | xml2tsv 2>/dev/null \
       +        | grep marquee/b/i \
       +        | cut -f 4 \
       +        | sed 's,&nbsp;,,g' \
       +        | sed 's,\\n,,g' \
       +        | sed 's,\\t,,g' \
       +        | shuf -n 1
       +