Add advent of code 2022 news cronjob. - 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 6e95b79193487aa2115071d8abf63210cfdfc58c DIR parent 7479e681318f66f9c0ca2a3c62ced736ae759db6 HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Thu, 1 Dec 2022 14:21:56 +0100 Add advent of code 2022 news cronjob. Diffstat: A advent-of-code-cronjob-2022.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+), 0 deletions(-) --- DIR diff --git a/advent-of-code-cronjob-2022.sh b/advent-of-code-cronjob-2022.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +export PATH="/home/annna/bin:$PATH" + +aocuri="$(curl -s https://adventofcode.com/ \ + | grep aria-label \ + | sed 's,.*href="\([^"]*\)".*,https://adventofcode.com\1,g' \ + | sort \ + | tail -n 1)" + +annna-say -c "#bitreich-en" "Today's advent of code challenge: ${aocuri}" +