Add newyear cronjob and add pre-notices to start newyeard. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit e972daa0ce6466c8ff5aac83fc83e81ce6f5fde9
DIR parent 188cb2758c98d54ec82827974144aeac5f172f51
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 25 Feb 2023 11:44:36 +0100
Add newyear cronjob and add pre-notices to start newyeard.
Diffstat:
M annna-message-common | 2 +-
M ed-cronjob | 5 +++++
M groundhog-cronjob | 5 +++++
A newyear-cronjob | 17 +++++++++++++++++
M rs-232-cronjob | 5 +++++
5 files changed, 33 insertions(+), 1 deletion(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -717,7 +717,7 @@ case "${text}" in
fi
;;
"${ircuser}, what's my future?")
- puri="$(sacc gophers://parazyd.org/0/tarot.cgi | /br/bin/bitreich-paste)"
+ puri="$(sacc gopher://parazyd.org/0/tarot.cgi | /br/bin/bitreich-paste)"
annna-say -s "${server}" -c "${channel}" "${user}, your future is here: ${puri}"
;;
"${ircuser}, haha.")
DIR diff --git a/ed-cronjob b/ed-cronjob
@@ -4,6 +4,11 @@
export PATH="$PATH:/home/annna/bin"
curdate="$( (echo obase=16; date +%j) | bc )"
+if [ "${curdate}" = "EC" ];
+then
+ annna-say -c "#bitreich-en" "One day until ED day! gophers://bitreich.org/1/ed"
+fi
+
if [ "${curdate}" = "ED" ];
then
annna-say -c "#bitreich-en" "Today is ED day! Celebrate! gophers://bitreich.org/1/ed"
DIR diff --git a/groundhog-cronjob b/groundhog-cronjob
@@ -4,6 +4,11 @@
export PATH="$PATH:/home/annna/bin"
curdate="$(LANG=C date -I | cut -d- -f 2-)"
+if [ "${curdate}" = "02-01" ];
+then
+ annna-say -s "irc.libera.chat" -c "#gopherproject" "One day until Groundhog Day! gophers://bitreich.org/1/groundhog-day"
+fi
+
if [ "${curdate}" = "02-02" ];
then
annna-say -s "irc.libera.chat" -c "#gopherproject" "Today is Groundhog day! Celebrate! gophers://bitreich.org/1/groundhog-day"
DIR diff --git a/newyear-cronjob b/newyear-cronjob
@@ -0,0 +1,17 @@
+#!/bin/sh
+#set -x
+
+export PATH="$PATH:/home/annna/bin"
+
+curdate="$(LANG=C date -I | cut -d- -f 2-)"
+if [ "${curdate}" = "12-31" ];
+then
+ annna-say -s "irc.libera.chat" -c "#gopherproject" "One day until New Year!"
+ # TODO: Automatically start newyeard?
+fi
+
+if [ "${curdate}" = "01-01" ];
+then
+ annna-say -s "irc.libera.chat" -c "#gopherproject" "Today is a new Year! Celebrate!"
+fi
+
DIR diff --git a/rs-232-cronjob b/rs-232-cronjob
@@ -4,6 +4,11 @@
export PATH="$PATH:/home/annna/bin"
curdate="$( date +%j )"
+if [ "${curdate}" = "231" ];
+then
+ annna-say -c "#bitreich-en" "One day until RS-232 day! gopher://gopherpedia.com/0/RS-232"
+fi
+
if [ "${curdate}" = "232" ];
then
annna-say -c "#bitreich-en" "Today is RS-232 day! Celebrate! gopher://gopherpedia.com/0/RS-232"