Add gitlab vuxml cronjob to remind us of how good gitlab is. - 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 98e6b1f305c2208822b7fd942ae0852811000746 DIR parent ef1c0185b8ef1325f3fb8b7b69e2ca0e3b80502b HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Thu, 10 Aug 2023 23:32:59 +0200 Add gitlab vuxml cronjob to remind us of how good gitlab is. Diffstat: A gitlab-vuxml-cronjob | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+), 0 deletions(-) --- DIR diff --git a/gitlab-vuxml-cronjob b/gitlab-vuxml-cronjob @@ -0,0 +1,36 @@ +#!/bin/sh + +export PATH="$HOME/bin:$PATH" + +insultserver="irc.bitreich.org" +insultchannel="#bitreich-en" +if [ -n "$CURDATE" ]; +then + curdate="${CURDATE}" +else + curdate="$(date +%Y-%m-%d)" +fi + +vuxmluri="$(curl -Ls http://www.vuxml.org/freebsd/pkg-gitlab-ce.html \ + | grep 'class="topic"' \ + | head -n 1 \ + | sed 's,.*href="\([^"]*\)".*,http://www.vuxml.org/freebsd/\1,g')" +entrydate="$(curl -Ls "${vuxmluri}" \ + | grep 'class="content"' \ + | sed 's,.*>\([^<]*\)<.*,\1,' \ + | grep "^[0-9]" \ + | head -n 2 \ + | tail -n 1)" + +randinsult="$({ + printf "Evil_Bob, haha, look at these gitlab losers: %%s\n" + printf "Evil_Bob, stagit is unaffected! gitlab vuln %s\n" + printf "Evil_Bob, who is still using gitlab? %s\n" +} | shuf -n 1)" + +if [ "$curdate" = "$entrydate" ] +then + annna-say -s "$insultserver" -c "$insultchannel" \ + "$(printf "${randinsult}" "${vuxmluri}")" +fi +