Skip to content

Instantly share code, notes, and snippets.

@vad
Last active November 29, 2021 15:50
Show Gist options
  • Save vad/548d9afe5ec21e655f9c920708c41f3f to your computer and use it in GitHub Desktop.
Save vad/548d9afe5ec21e655f9c920708c41f3f to your computer and use it in GitHub Desktop.
fetch sudokus from puzzles.ca and upload them to a reMarkable device using rmapi
#!/bin/env bash
set -o errexit -o pipefail -o noclobber -o nounset
# handle non-option arguments
if [[ $# -ne 2 ]]; then
echo "$0: Requires 2 arguments: level (easy|medium|hard) and index (001..973 and counting)."
exit 1
fi
LEVEL=$1
I=$2
FN=sudoku_${LEVEL}_${I}
wget -q https://www.puzzles.ca/sudoku_puzzles_images/${FN}.gif
convert ${FN}.gif ${FN}.pdf
rmapi put ${FN}.pdf /Giochi/Sudoku/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment