#! /bin/sh # Zeitgeist v1.7 by Bernd Kilga # # Nifty helper script to automatically download the latest Zeit.de PDF ePaper and Audio MP3 files from their premium server. # Recommended to run on Saturdays, once per week (they push out new releases on Friday). # # A valid Die Zeit Premium subscription is required, fill in username/password below and pick a target directory. # # Latest version: http://72dpi.console.cc/__/attachments/zeitgeist.sh.txt # 2010-02-18 v1.7 # Adjusted new monthly scheme # # 2008-07-12 v1.6 # Fixed the new new PDF URL # # 2008-06-07 v1.5 # Adjusted to the new PDF URL # # 2008-02-12 v1.4 # Improved final ls # # 2008-01-19 v1.3 # Fixed week offset # # 2008-01-12 v1.2 # Fixed week 1 -> 01 bug # # 2007-12-30 v1.1 # Fixed week 53 -> week 01 bug # Inital public release # # 2007-04-07 v1.0 # internal release # username='PLEASE_ENTER_USERNAME' password='PLEASE_ENTER_PASSWORD' targetdir='/tmp/zeitgeist/' # y=`date +%-y` w=$[`date +%-W`+1] if [ ${w} -lt 10 ]; then w=0${w}; fi if [ ${w} -gt 52 ]; then w=0$[$w-52] y=$[$y + 1] fi echo 'Zeitgeist v1.7'; echo 'by Console++ / frame@console.cc'; echo echo Fetching Audio_${y}${w}.zip ... wget -q --no-check-certificate --user=${username} --password=${password} -O ${targetdir}Audio_${y}${w}.zip "https://premium.zeit.de/cgi-bin/_er_member/p4z.fpl?ER_Do=prepareBuyDocument&Abo_Document=/media/${y}/${w}/Audiofiles_DIE_ZEIT_${w}.zip&Abo_ServerName=horchen.zeit.de" echo Fetching ePaper_${w}${y}.pdf ... wget -q --user=${username} --password=${password} -O ${targetdir}ePaper_${y}${w}.pdf "http://epaper.zeit.de/archiv/DZ/pdf/DZ_ePaper_${w}_${y}.pdf" echo ls -thlgo ${targetdir}