This is the mail archive of the
dwarf2@corp.sgi.com
mailing list for the dwarf2 project.
possibly useful script
- To: dwarf SIG <dwarf2 at corp dot sgi dot com>
- Subject: possibly useful script
- From: David Weatherford <david dot weatherford at sun dot com>
- Date: Thu, 11 May 2000 14:33:06 -0700
- Organization: Sun Microsystems
- Reply-To: David Weatherford <david dot weatherford at sun dot com>
I thought I'd share a small script that I wrote to fetch the "new" proposals
from Mike's web site. It will optionally convert the html to "iSilo" format
for the Palm, as well.
Enjoy!
--
Dave Weatherford Forte Tools
David.Weatherford@Sun.COM Sun Microsystems, Inc.
#!/bin/ksh
# creates 001122.1.html and 001122.1.pdb (e.g.) in the current directory for
# each "new" proposal at Mike Eager's DWARF 2 status web site
# uses lynx, awk, sed, and (optionally) iSiloSpc (for Palm iSilo html reader)
doPalm=true # change this to false if you don't have the iSilo converter
TMP=/tmp/fetch.$$
trap "rm -f $TMP*" 0 1 2 3 15
lynx -source "http://www.eagercon.com/dwarf/dwarf2std.htm" >$TMP.1
awk '
/issues.[90][90][01][0-9][0-3][0-9]-.*\.htm/ {
start = index($0, "issues")
end = index($0, ".htm") + 4
url = "http://www.eagercon.com/dwarf/" substr($0, start, end - start)
}
/>N</ { print url } # only "new" proposals
' <$TMP.1 >$TMP.2
for i in $(< $TMP.2)
do
n=$(echo $i | sed 's|.*issues/\(.*\).htm|\1|' | sed 's/-/./')
lynx -source "$i" >$n.html
if $doPalm
then
iSiloSpc $n.html >/dev/null # make .pdb for Palm
fi
done
begin:vcard
n:Weatherford;David
tel;work:650 786-8942
x-mozilla-html:TRUE
org:Sun Microsystems, Inc.;Forte Tools
version:2.1
email;internet:David.Weatherford@Sun.COM
title:<img src="http://xidus.net/~weath/weath-small.gif"><br>Staff Engineer
adr;quoted-printable:;;901 San Antonio Road=0D=0AMS UMPK16-305;Palo Alto;CA;94303;
x-mozilla-cpt:;-8304
fn:David Weatherford
end:vcard