Add perl feelings 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 c62c9fec4a13413d88e310849ad325b2e3329318
(DIR) parent 100ffb3a37e4edce739561734d71747445269390
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 24 Jul 2021 19:56:14 +0200
Add perl feelings to annna.
Diffstat:
M annna-message-common | 7 +++++++
A perl-feelings | 11 +++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/annna-message-common b/annna-message-common
@@ -268,6 +268,13 @@ case "${text}" in
postmortem="$(post-mortem | /br/bin/bitreich-paste)"
annna-say -c "${channel}" "${user}, do not feel bad, others had worse days: ${postmortem}"
;;
+"${botname}, I feel perl.")
+ perlfeelings="$(perl-feelings)"
+ if [ -n "${perl-feelings}" ];
+ then
+ annna-say -c "${channel}" "${user}, I feel ${perlfeelings}"
+ fi
+ ;;
"${botname}, will you be my girlfriend?")
rejection="$(girlfriend)"
annna-say -c "${channel}" "${user}, ${rejection}"
(DIR) diff --git a/perl-feelings b/perl-feelings
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# See: https://www.mcmillen.dev/sigbovik/
+#
+
+curl -s https://www.mcmillen.dev/sigbovik/splatters.html \
+ | grep "^<div>" \
+ | grep -v "Not valid" \
+ | sed 's,<div>\([^<]*\)<br><a href="\([^"]*\)".*,\1 = https://www.mcmillen.dev/sigbovik/\2,' \
+ | shuf -n 1
+