[TAG] Frappr

Jimmy O'Regan jimregan at o2.ie
Mon Oct 31 15:58:59 MSK 2005


Rick Moen wrote:

> Quoting Benjamin A. Okopnik (ben at linuxgazette.net):
> 
> 
>>I find myself travelling a lot, but often forgetting who's where (I was
>>just in Chicago last week, and remembered, too late and with much
>>chagrin, that Chris G. lives there.)
> 
> 
> http://linuxmafia.com/~rick/ says:
> ICBM: 122.19781??W, 37.43162??N, 27.4 metreslevation
> (When you care enough to send the very best!)
> 
> Feed that into xearth, and lo!

Hmm.

===== SNIP HERE frappr.pl.txt =====
#!/usr/bin/perl

while (<>)
{
	# Yes, this is one long line.
	if 
(/<tr><td><a\Whref="#"\WonClick="javascript:openMarker\(\d*,parseFloat\('([^']*)'\),parseFloat\('([^']*)'\)\);">(<img\Wsrc=([^ 
]*)[^>]*>)?<\/a><\/td><td><a\Whref="#"\WonClick="javascript:openMarker\(\d*,parseFloat\('\1'\),parseFloat\('\2'\)\);">([^<]*)<\/a><font 
size=1>([^<]*)<\/font>,\W<font[^>]*>([^<]*)<\/font><br><font\Wsize=2>([^<]*)<\/font><\/td><\/tr>/)
	{
		my ($long, $lat, $img, $name, $address) = ($1, $2, $4, $5, $6);
		print "$long $lat \"$name\"\n";
	}
}
===== SNIP HERE =====

Pipe "lynx -source http://www.frappr.com/linuxgazette|frappr.pl" into 
xearth, and see if it works (I don't have a copy to try it myself).








More information about the TAG mailing list