Skip to content

Instantly share code, notes, and snippets.

@avrahamappel
Created January 5, 2026 04:56
Show Gist options
  • Select an option

  • Save avrahamappel/5e3ec43d8a71e2aefecad91005c447f9 to your computer and use it in GitHub Desktop.

Select an option

Save avrahamappel/5e3ec43d8a71e2aefecad91005c447f9 to your computer and use it in GitHub Desktop.
Download a full masechta from realcleardaf.com
#!/usr/bin/env nix-shell
#!nix-shell -p curl fd poppler-utils
MASECHTA=${MASECHTA:-yevamos}
DAFIM=${DAFIM:-122}
for daf in {2..$DAFIM}; do
for amud in {a..b}; do
echo "Downloading $MASECHTA daf $daf$amud"
curl --output-dir $MASECHTA -O "https://www.realcleardaf.com/wp-content/uploads/daf/$MASECHTA-$daf$amud.pdf"
done
done
pdfunite $(fd . "./$MASECHTA") $MASECHTA.pdf && rm -rf "./$MASECHTA"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment