Letters to the editor
Reading LWN on a Palm pilot
From: | David Heath <david.heath-AT-oneworld.net> | |
To: | lwn-AT-lwn.net | |
Subject: | Reading LWN on a Palm pilot | |
Date: | Thu, 20 Jan 2005 14:02:32 +0000 |
hi,
I thought you (and other LWN readers) might find the attached script
useful. I use it in combination with 'plucker' (http://www.plkr.org/ I
have v1.4) to fetch and download LWN onto my palm pilot. It's very much
a hack but it does work reliably (albeit without much finesse).
When run it will fetch the LWN home page, determine the URL of the
latest LWN edition (ie. this week's) and start fetching the pages from
that edition in 'printable format'. It relies on the cookie database
from galeon to get past authentication for reading the latest week's
news. It prob will work with other browsers just by changing the path of
the cookie file in the script.
Usage:
$ get-lwn.sh
...
$ gpilot-install-file /home/heathd/.plucker/lwn_20050120.pdb.pdb
gpilotd-Message: Activating object OAFIID:GNOME_Pilot_Daemon
fileconduit-Message: palmVx completed 641915326
Dave
PS. I'm just off to the café to read this week's LWN on my PalmV.
--
David Heath
Web Application Developer
OneWorld International, 2nd Floor, River House
143-145 Farringdon Road, London, EC1R 3AB, UK
E: david.heath@oneworld.net
W: http://www.oneworld.net/
T: +44 20 7239 1424
F: +44 20 7833 8347
#!/bin/sh # gets this weeks list of pages export DATESTAMP=`date +%Y%m%d` export OUTPUTDIR=~/Documents/plucker/lwn export ABSOUTDIR=$OUTPUTDIR/$DATESTAMP mkdir -p $ABSOUTDIR cd $ABSOUTDIR wget --load-cookies /home/heathd/.galeon/mozilla/galeon/cookies.txt -O /dev/stdout -o /dev/null http://lwn.net/current/ | grep -A 17 'LWN Weekly Edition' | grep '<a href=.*Articles\/[0-9]*\/"' | sed -r 's/^.*(\/Articles\/)([0-9]+)\/.*$/wget \-\-load\-cookies \/home\/heathd\/.galeon\/mozilla\/galeon\/cookies.txt \-O \2.html http:\/\/lwn.net\1\2\/?format=printable/' > lwn-get-list.sh sh lwn-get-list.sh ls -1 *.html | sed -r 's/^(.*)$/<a href="\1" >\1<\/a><br \/>/' > index.html ls -1 *.html | sed -r "s/^(.*)$/<a href='$DATESTAMP\/\1' >\1<\/a><br \/>/" > ../index.html rm -f lwn-get-list.sh plucker-build --doc-name "lwn $DATESTAMP" --doc-file=lwn_$DATESTAMP.pdb --home-url=///home/heathd/Documents/plucker/lwn/$DATESTAMP/index.html --maxdepth=2
Page editor: Jonathan Corbet