Adding #geriatric-crime tag. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 26d79573c8f9f31c2798e772161e07c0b4d6d0be | |
parent cebb95acee83682f45accec65eb5238e1ec0abc7 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sun, 30 May 2021 23:04:31 +0200 | |
Adding #geriatric-crime tag. | |
Diffstat: | |
M annna-say | 2 +- | |
M annna-start-main | 28 +++++++++++++++------------- | |
M annna-start-services | 5 +++-- | |
M gutenberg-news | 14 +++++++++----- | |
M modules/hashtags/hashtags.txt | 1 + | |
5 files changed, 29 insertions(+), 21 deletions(-) | |
--- | |
diff --git a/annna-say b/annna-say | |
@@ -12,7 +12,7 @@ usage() { | |
} | |
channels="" | |
-ircbase="/home/annna/irc/chat.freenode.net" | |
+ircbase="/home/annna/irc/irc.bitreich.org" | |
while getopts "hb:c:" opt; | |
do | |
diff --git a/annna-start-main b/annna-start-main | |
@@ -1,5 +1,7 @@ | |
#!/bin/sh | |
+set -x | |
+ | |
export PATH="$PATH:/home/annna/bin" | |
# #bitreich is a forward to #bitreich-en. Annna does not need to join it. | |
@@ -9,7 +11,7 @@ channels="#bitreich #bitreich-con #bitreich-radio | |
#bitreich-scm #bitreich-en #bitreich-de | |
#bitreich-fr #bitreich-cooking | |
#bitreich-nl #bitreich-lawn #bitreich-it | |
- #bitreich-tv #bitreich-meme" | |
+ #bitreich-tv #bitreich-meme #bitreich-books" | |
# Testing | |
#channels="#bitreich-scm" | |
@@ -30,11 +32,11 @@ rm -f "$HOME/irc/${server}/sock" | |
#done | |
# Connection | |
-export ircuser="$(sed -n 's/^user: //p' $HOME/irc/${server}/irc-credentials.tx… | |
-export ircpass="$(sed -n 's/^pass: //p' $HOME/irc/${server}/irc-credentials.tx… | |
+export ircuser="$(sed -n 's/^user: //p' $HOME/annna/${server}/irc-credentials.… | |
+export ircpass="$(sed -n 's/^pass: //p' $HOME/annna/${server}/irc-credentials.… | |
#ii -s "${server}" -t -p 6697 -n "$ircuser" -k ircpass \ | |
# -f "Annna Robert-Houdin" & | |
-ii -s "${server}" -t -p 6697 -n "$ircuser" \ | |
+ii -s "${server}" -v -t -p 6697 -n "$ircuser" \ | |
-f "Annna Robert-Houdin" & | |
iipid=$! | |
@@ -46,15 +48,15 @@ do | |
done | |
## Waiting for the motd to have ended so we can send something. | |
-while [ -z "$(grep "End of /MOTD command" $HOME/irc/${server}/out)" ]; | |
-do | |
- if [ -n "$(grep "Nickname is already in use" $HOME/irc/${server}/out)"… | |
- then | |
- exit 1 | |
- fi | |
- | |
- sleep 0.5 | |
-done | |
+#while [ -z "$(grep "End of /MOTD command" $HOME/irc/${server}/out)" ]; | |
+#do | |
+# if [ -n "$(grep "Nickname is already in use" $HOME/irc/${server}/out)… | |
+# then | |
+# exit 1 | |
+# fi | |
+# | |
+# sleep 0.5 | |
+#done | |
sleep 2 | |
diff --git a/annna-start-services b/annna-start-services | |
@@ -8,10 +8,11 @@ export PATH="$PATH:/home/annna/bin" | |
# plan9port | |
export PATH="$PATH:/opt/plan9/bin" | |
-server="chat.freenode.net" | |
+server="irc.bitreich.org" | |
iiroot="/home/annna/irc" | |
iibase="/home/annna/irc/${server}" | |
-channel_list="#bitreich-en #bitreich-fr #bitreich-de #bitreich-nl #bitreich-it… | |
+channel_list="#bitreich #bitreich-en #bitreich-fr #bitreich-de #bitreich-nl #b… | |
+ | |
#testing | |
#channel_list="#bitreich-scm" | |
diff --git a/gutenberg-news b/gutenberg-news | |
@@ -1,9 +1,13 @@ | |
#!/bin/sh | |
-# | |
-# Preparation for #bitreich-books. | |
-# | |
-curl -s gopher://gopher.icu/0/gutenberg/newbooks.atom \ | |
+export PATH="$HOME/bin:$PATH" | |
+ | |
+bookchannel="#bitreich-books" | |
+ | |
+bookrec="$(curl -s gopher://gopher.icu/0/gutenberg/newbooks.atom.xml \ | |
| sfeed \ | |
- | sed 's,^[0-9]*\t\([^\t]*\)\t\([^\t]*\).*,\1 ( \2 ),' | |
+ | sed 's,^[0-9]*\t\([^\t]*\)\t\([^\t]*\).*,\1 ( \2 ),' \ | |
+ | shuf -n 1)" | |
+ | |
+annna-say -c "${bookchannel}" "Today's book recommendation: ${bookrec}" | |
diff --git a/modules/hashtags/hashtags.txt b/modules/hashtags/hashtags.txt | |
@@ -3749,6 +3749,7 @@ | |
#geology-training gopher://bitreich.org/9/memecache/geology-training.mkv | |
#geophysics gopher://bitreich.org/I/memecache/geophysics.png | |
#george-washington gopher://bitreich.org/I/memecache/george-washington.png | |
+#geriatric-crime gopher://bitreich.org/9/memecache/geriatric-crime.mp4 | |
#german gopher://bitreich.org/9/memecache/german.mkv | |
#german-attack gopher://bitreich.org/9/memecache/german-attack.mp4 | |
#german-burger gopher://bitreich.org/I/memecache/german-burger.jpg |