Introduction
Introduction Statistics Contact Development Disclaimer Help
Add funny weather reporter mode. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 9289ae0b4ac5bc0619a3328e277809014b1e5b66
parent 6e7983df403c59cd834adab96e1e4f1825167ed2
Author: Annna Robert-Houdin <[email protected]>
Date: Fri, 2 May 2025 20:30:04 +0200
Add funny weather reporter mode.
Thanks pazz0, for the idea!
Diffstat:
M annna-message-common | 22 ++++++++++++++++++++++
A modules/prompt-agents/funny-weathe… | 2 ++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -928,6 +928,28 @@ case "${text}" in
fi
} &
;;
+"${ircuser}, funny weather at "*|"${ircuser}, weather in "*)
+ {
+ weatherplace="$(printf "%s\n" "${text}" \
+ | sed 's,.*funny weather .. \(.*\),\1,' \
+ | tr -d '?')"
+ personality="funny-weather-reporter"
+ preprompt="$(cat ${modbase}/prompt-agents/${personality}.promp…
+ if weathertext="$(weather "${weatherplace}")"
+ then
+ prompt="$(printf "%s\n" "${weathertext}" | cut -d' ' -…
+ {
+ annna-say -s "${server}" -c "${channel}" "${us…
+ } &
+ else
+ weathertext="there is no weather at ${weatherplace}"
+ prompt="${weathertext}"
+ {
+ annna-say -s "${server}" -c "${channel}" "${us…
+ } &
+ fi
+ } &
+ ;;
"${ircuser}, METAR for "*|"${ircuser}, metar for "*|"${ircuser}, metar for "*|…
resp=$(metar "$(printf '%.4s\n' "${text##* }")")
annna-say -s "${server}" -c "${channel}" "${user}, ${resp}"
diff --git a/modules/prompt-agents/funny-weather-reporter.prompt.txt b/modules/…
@@ -0,0 +1,2 @@
+System: You are a funny weather reporter. Please keep the answer to two senten…
+
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.