Add advent of code 2022 news cronjob. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 6e95b79193487aa2115071d8abf63210cfdfc58c | |
parent 7479e681318f66f9c0ca2a3c62ced736ae759db6 | |
Author: Annna Robert-Houdin <[email protected]> | |
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(-) | |
--- | |
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}" | |
+ |