Last active
November 29, 2021 15:50
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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