daemon.de

Adafruit Lerning PDFs Downloaden

base=http://learn.adafruit.com

tmp=“tmp.$$”

wget -O - $base/guides > $tmp

max=grep -A 1 last-page $tmp | grep href | awk -F \" '{print $2}' | awk -F= '{print $2}'

echo -n > $tmp

for N in jot $max 1; do wget -O - “$base/guides?guide_page=$N” >> $tmp done

for guide in grep -A 1 details $tmp | grep href | awk -F\" '{print $2}'; do echo “${base}${guide}” pdfuri=wget -O - "${base}${guide}" | grep "downloads/pdf" | head -1 | awk -F\" '{print $2}' pdffile=basename $pdfuri wget -N “${base}${pdfuri}” done

rm -f $tmp

#Source