Skip to content

Instantly share code, notes, and snippets.

@rberenguel
Created June 1, 2024 17:46
Show Gist options
  • Save rberenguel/6cb0612c460c876f373983763d978228 to your computer and use it in GitHub Desktop.
Save rberenguel/6cb0612c460c876f373983763d978228 to your computer and use it in GitHub Desktop.
Hazel rule to analyse exports from DailyGammon magically
echo "" > commands
ID=$(echo "$1" | sed 's/.*dg_\([0-9]*\).*/\1/g')
echo "set sound enable off" >> commands
echo "set analysis chequerplay evaluation plies 3" >> commands
echo "import mat \"$1\"" >> commands
echo "analyse match" >> commands
echo "export match pdf \"reviews/$ID.pdf\"" >> commands
echo "quit" >> commands
/Users/ruben/fromsource/bg/gnubg-1.07.001/gnubg -c commands
rm commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment