Skip to content

Instantly share code, notes, and snippets.

@rubiojr
Last active December 20, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubiojr/6152274 to your computer and use it in GitHub Desktop.
Save rubiojr/6152274 to your computer and use it in GitHub Desktop.
#ruby #python #raspberrypi #devops
#!/bin/bash
#
# Needs wget and wkpdf
#
# Python Weekly News
FIRST=1
LAST=81
BASE_URL=http://www.pythonweekly.com/archive/
mkdir pwn
for n in $(seq $FIRST $LAST); do
RBENV_VERSION=system wkpdf --source ${BASE_URL}$n.html --output pwn/$n.pdf
done
# Ruby Weekly News
FIRST=15
LAST=156
BASE_URL="http://rubyweekly.com/archive/"
mkdir rwn
for n in $(seq $FIRST $LAST); do
RBENV_VERSION=system wkpdf --source ${BASE_URL}$n.html --output rwn/$n.pdf
done
# DevOps Weekly News
mkdir dwn
for l in `wget http://devopsweekly.com/archive -O -|egrep -o '\/20.*issue-.*?\/'`; do
NAME=`echo $l | egrep -o "issue-\d+"`
RBENV_VERSION=system wkpdf --source http://devopsweekly.com$l --output dwn/${NAME}.pdf
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment