Introduction
Introduction Statistics Contact Development Disclaimer Help
Add chinese-newyear cronjob, fix newyear cronjob. - annna - Annna the nice frie…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit c0057dc11ffb38e29ac6bd63691f02cf5d40c39e
parent e572704e163cfa38f76537025eef4b217a9b6213
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 26 Feb 2023 18:32:50 +0100
Add chinese-newyear cronjob, fix newyear cronjob.
Diffstat:
A chinese-newyear-cronjob | 17 +++++++++++++++++
M newyear-cronjob | 5 ++---
2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/chinese-newyear-cronjob b/chinese-newyear-cronjob
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+export PATH="$PATH:/home/annna/bin"
+
+chinesenewyear="$($HOME/.local/bin/lunar-find 春节 | cut -d: -f2 | cut -c 2-…
+cnyprior="$(date -d "$chinesenewyear - 1 day" +"%Y-%m-%d")"
+curdate="$(LANG=C date -I)"
+if [ "${curdate}" = "${cnyprior}" ];
+then
+ annna-say -s "irc.bitreich.org" -c "#bitreich-en" "One day until Chine…
+fi
+
+if [ "${curdate}" = "${chinesenewyear}" ];
+then
+ annna-say -s "irc.bitreich.org" -c "#bitreich-en" "Today is a Chinese …
+fi
+
diff --git a/newyear-cronjob b/newyear-cronjob
@@ -6,12 +6,11 @@ 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 …
- # TODO: Automatically start newyeard?
+ annna-say -s "irc.bitreich.org" -c "#bitreich-en" "One day until New Y…
fi
if [ "${curdate}" = "01-01" ];
then
- annna-say -s "irc.libera.chat" -c "#gopherproject" "Today is a new Yea…
+ annna-say -s "irc.bitreich.org" -c "#bitreich-en" "Today is a new Year…
fi
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.