Contents:
Since the excellent mindit! service went commercial I thought I'd see
how hard it could really be to keep an eye on web pages. Here's the
result - watchpage.pl is a very simple perl script that uses
lynx(1) to check the latest version of your favourite web
pages. If it it finds a change it prints a message to stdout
and
stores the latest content in ~/.watchpage
.
watchpage.pl requires no fancy perl modules - just the stock
standard distribution as installed on eg. Linux. It relies on
lynx(1) for downloading the pages.
It would be easy to put the hotlist into a separate file and use a GUI
to edit it but I'll leave that to someone else. I find that editing
watchpage.pl itself is just as easy.
Here it is: watchpage.pl
Just put watchpage.pl somewhere convenient (perhaps
/usr/local/bin
) and chmod a+x
I put watchpage into crontab(1) to execute every morning before I
get to work with a line like:
40 5 * * * /usr/local/bin/watchpage.pl
cron(8) sends the output to me by email.
You could also put watchpage.pl into the dialup startup script
eg. /etc/ppp/ip-up.local
so you can check your pages whenever
you connect to the web.
- The hotlist should be separated from the program - perhaps into
~/.watchpage/hotlist - then every user can have their own version (on
a multiuser system)
- The hotlist could use a Tcl/Tk or other GUI editor put
together for it.
- watchpage.pl does not look at the modification date in the
HTTP header. Perhaps it could use this information - at present it is
purely content-based.
- Perhaps watchpage.pl should create an HTML page (in
~/.watchpage
with links to all the new stuff?
watchpage.pl only looks at the text contents of the URL. Obviously
pages that change every time you look at them (eg. with a date field)
may produce gratuitous hits.
watchpage.pl won't pick up changes in non-text elements such as
graphics.
I haven't even begun to think about security considerations.
Greatly appreciated!
GPL
This page last updated on Sat Dec 21 18:12:37 EST 2002
For corrections/additions/suggestions for this
page, please send email to: Support Copyright© 1997-2002 Bob Hepple. All rights reserved.'