lichess daily puzzle hack - randomcrap - random crap programs of varying quality
HTML git clone git://git.codemadness.org/randomcrap
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 70c955341f0ad64c911cbe4004f2416e51e4ae84
DIR parent 2f4698f34d63b5174d92dc62df93bc7877d06abc
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 5 Feb 2024 18:06:33 +0100
lichess daily puzzle hack
Diffstat:
A lichess-daily.sh | 5 +++++
1 file changed, 5 insertions(+), 0 deletions(-)
---
DIR diff --git a/lichess-daily.sh b/lichess-daily.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Lichess daily puzzle for the tty.
+# Dependencies: chess-puzzles fen.c, json2tsv, pgn-extract, curl
+
+./fen -o tty startpos "$(curl -s 'https://lichess.org/api/puzzle/daily' | jaq '$1 == ".game.pgn" { print $3 " *" }' | pgn-extract -Wuci --notags 2>/dev/null)"