View Single Post
Old 03-28-2008, 04:42 PM   #11
cen doesn't littercen doesn't litter
Posts: 53
Karma: 140
Join Date: Mar 2008
Device: iRex iLiad (v1) / Sony Librie
Problem solved, assuming you had the same issue as me. The script fails if /media/cf/newspapers/Guardian24/ doesn't exist (and I never bothered to create it as I put the script elsewhere )

Updated code to create the root newspaper dir if it doesnt exist (mkdir -p)
To get the wifi working:
uncomment the following lines
#/usr/bin/ start <SSID> <ENC_TYPE> <PASS>
#/usr/bin/ stop

and replace <...> with your wifi details.

export GUARDIAN_PATH=/media/cf/newspapers/Guardian24/
/usr/bin/ start
#/usr/bin/ start <SSID> <ENC_TYPE> <PASS>
rm -rf $GUARDIAN_PATH/Guardian.pdf
mkdir -p $GUARDIAN_PATH/Guardian.pdf
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><package><metadata><dc-metadata><Title>The Guardian 24h edition</Title><Description>Downloaded: `echo \`date\``</Description></dc-metadata><y-metadata><startpage>Guardian.pdf</startpage><image>icon.png</image><version>000</version></y-metadata></metadata></package>" > $GUARDIAN_PATH/Guardian.pdf/manifest.xml
wget -O $GUARDIAN_PATH/Guardian.pdf/Guardian.pdf
cp $GUARDIAN_PATH/get-guardian/icon.png $GUARDIAN_PATH/Guardian.pdf/icon.png
/usr/bin/ stop
#/usr/bin/ stop

edit: sort of works, gets to 28% download of the PDF then stalls and craps out (but the PDF is created). YMMV

Last edited by cen; 03-28-2008 at 04:54 PM.
cen is offline   Reply With Quote