advent-of-code-cronjob-2022.sh - 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
---
advent-of-code-cronjob-2022.sh (337B)
---
1 #!/bin/sh
2
3 export PATH="/home/annna/bin:$PATH"
4
5 aocuri="$(curl -s https://adventofcode.com/ \
6 | grep aria-label \
7 | sed 's,.*href="\([^"]*\)".*,\1,g' \
8 | cut -d'/' -f 4 \
9 | sort -n \
10 | sed 's,\(.*\),https://adventofcode.com/2022/day/\1,g' \
11 | tail -n 1)"
12
13 annna-say -c "#bitreich-en" "Today's advent of code challenge: ${aocuri}"
14