Newsgroups: alt.internet.services
Subject: wxmap-2.0 (was Re: Satellite Weather Pictures)
From: rodmur@ecst.csuchico.edu (Dale Harris)
Date: 12 Nov 1992 02:58:54 GMT
Organization: California State University, Chico
NNTP-Posting-Host: hairball.ecst.csuchico.edu

In article <7215060627278@spatial> shugrue@spatial (Leon Shugrue) writes:
>In article <1992Nov6.100445.16638@aston.ac.uk> frostmd@uhura.aston.ac.uk (MD FROST) writes:
>>
>>I remember some time ago seeing a post that included a script for downloading
>>daily weather pictures in the GIF format. Has anybody got a copy of this?


Here's a little C program I wrote to grab the maps.  It is the same that
was posted to alt.sources.  Enjoy!

#---------------------------------- cut here ----------------------------------
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Dale Harris <rodmur@hairball> on Wed Nov 11 18:58:36 1992
#
# This archive contains:
#	wxmap-2.0	
#
# Existing files will not be overwritten.
# Error checking via wc(1) will be performed.
# Error checking via sum(1) will be performed.
# Files are compressed using compress(1).

LANG=""; export LANG
PATH=/bin:/usr/bin:$PATH; export PATH

if sum -r </dev/null >/dev/null 2>&1
then
	sumopt='-r'
else
	sumopt=''
fi

echo mkdir - wxmap-2.0
mkdir wxmap-2.0

if test -f wxmap-2.0/Makefile
then
	echo Ok to overwrite existing file wxmap-2.0/Makefile\?
	read answer
	case "$answer" in
	[yY]*)	echo Proceeding;;
	*)	echo Aborting; exit 1;;
	esac
	rm -f wxmap-2.0/Makefile
	if test -f wxmap-2.0/Makefile
	then
		echo Error: could not remove wxmap-2.0/Makefile, aborting
		exit 1
	fi
fi

rm -f /tmp/uud$$
(echo "begin 666 /tmp/uud$$\n#;VL*n#6%@x\n \nend" | uudecode) >/dev/null 2>&1
if [ X"`cat /tmp/uud$$ 2>&1`" = Xok ]
then
	unpacker=uudecode
else
	echo Compiling unpacker for non-ascii files
	pwd=`pwd`; cd /tmp
	cat >unpack$$.c <<'EOF'
#include <stdio.h>
#define C (*p++ - ' ' & 077)
main()
{
	int n;
	char buf[128], *p, a,b;

	scanf("begin %o ", &n);
	gets(buf);

	if (freopen(buf, "w", stdout) == NULL) {
		perror(buf);
		exit(1);
	}

	while (gets(p=buf) && (n=C)) {
		while (n>0) {
			a = C;
			if (n-- > 0) putchar(a << 2 | (b=C) >> 4);
			if (n-- > 0) putchar(b << 4 | (a=C) >> 2);
			if (n-- > 0) putchar(a << 6 | C);
		}
	}
	exit(0);
}
EOF
	cc -o unpack$$ unpack$$.c
	rm unpack$$.c
	cd $pwd
	unpacker=/tmp/unpack$$
fi
rm -f /tmp/uud$$

echo x - wxmap-2.0/Makefile '[compressed]'
$unpacker <<'@eof'
begin 600 wxmap-2.0/Makefile
M'YV0(Q2, -$DS)HR9M*P*0/"S!LY(.[@:1,&CHLQ(.R4@2C#!0R!((:\@9-'X
M3IHS:.B 0#$D!0@G;S2V$;,11(P8+&SFR"$#! @Q>4 0";,01! 7()"$D6-RX
M#DB?4*-*G4HUZAXY;\BTJ2,'2)DQ<^A<G%-G#)HT8]ZX*$.F3A^! H<,Z7%FX
MS!@%<GO851#7"),@1Z;T:'$&Q$"'$,F4$5/GS)DT;@KW_1MX\!/#;=Z$!4'1X
M+.0R<T! !D'G;.@[#]F0F0Q8<(LG/4<@!E'W[A"_K7NL>#+#<,0TI4'8!?'&X
M35(H.6 H?W$##YX6<S:F 0U"3ATW;B 71@*E"A80.%RHX$NDB)$D3HH(!M&"X
MR)0L4ZSPE4@1CHZ($RM>5)" !,N6(/AW&V53N-3"&_C5%R *Y9V77H$)ZG>7X
9 F,L%(8;.O G1QOLF1&A10C25Y%P#Y6A &53                        X
                                                             X
end
@eof
uncompress <wxmap-2.0/Makefile >/tmp/compress$$
mv /tmp/compress$$ wxmap-2.0/Makefile
set `sum $sumopt <wxmap-2.0/Makefile`; if test $1 -ne 31439
then
	echo ERROR: wxmap-2.0/Makefile checksum is $1 should be 31439
fi
set `wc -lwc <wxmap-2.0/Makefile`
if test $1$2$3 != 2060423
then
	echo ERROR: wc results of wxmap-2.0/Makefile are $* should be 20 60 423
fi

chmod 644 wxmap-2.0/Makefile

if test -f wxmap-2.0/README
then
	echo Ok to overwrite existing file wxmap-2.0/README\?
	read answer
	case "$answer" in
	[yY]*)	echo Proceeding;;
	*)	echo Aborting; exit 1;;
	esac
	rm -f wxmap-2.0/README
	if test -f wxmap-2.0/README
	then
		echo Error: could not remove wxmap-2.0/README, aborting
		exit 1
	fi
fi
echo x - wxmap-2.0/README '[compressed]'
$unpacker <<'@eof'
begin 600 wxmap-2.0/README
M'YV00]"4&;,&Q)LZ=$#0$0BB29@U9<RD85.&!8@T9D#D.2C'H!L084!,R3+%X
M"H@V8<:@2>.FC,:#)].<09/P3A@W">F\4=""R,B2%E4.+'@P)\,19"*R="FQX
M#!LR<T"RF?/FXL>%+JG6D3.FC L0())DW%@'A$0W9!3<S -"3)TS4=]T1!/&X
MCLNU(.:\/5-F#ITT;]Q$+=,"Y400<MZ0:;,5R$"_+L;H59EFS!L79<C44:" X
B"ETW>$)P)A*&(@@D8>3(21-U3^+%C1_3B3QYI67,FOLH )EF            X
                                                             X
end
@eof
uncompress <wxmap-2.0/README >/tmp/compress$$
mv /tmp/compress$$ wxmap-2.0/README
set `sum $sumopt <wxmap-2.0/README`; if test $1 -ne 51251
then
	echo ERROR: wxmap-2.0/README checksum is $1 should be 51251
fi
set `wc -lwc <wxmap-2.0/README`
if test $1$2$3 != 739251
then
	echo ERROR: wc results of wxmap-2.0/README are $* should be 7 39 251
fi

chmod 644 wxmap-2.0/README

if test -f wxmap-2.0/wxmap.c
then
	echo Ok to overwrite existing file wxmap-2.0/wxmap.c\?
	read answer
	case "$answer" in
	[yY]*)	echo Proceeding;;
	*)	echo Aborting; exit 1;;
	esac
	rm -f wxmap-2.0/wxmap.c
	if test -f wxmap-2.0/wxmap.c
	then
		echo Error: could not remove wxmap-2.0/wxmap.c, aborting
		exit 1
	fi
fi
echo x - wxmap-2.0/wxmap.c '[compressed]'
$unpacker <<'@eof'
begin 600 wxmap-2.0/wxmap.c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#P929<>9OD-@=YX!08<3?QX
MA!<-IIAF@)S,@0;+N1?-V5S0>1YM,)V"@UK]U -XL2MK (/L!((F2&YW0!6*X
M@P+RJ5HAP%ETR5W,Q35)R&AN,"SW&:#&^7(.2I\88I_.U5K9M5WOEX/DIIB*X
MF7@P<%5/9E,XQ7R/QA4?EUZY*0)5H%-E\# *82,3@S$5<S%UT345\S$A\SY=X
MX'>XAY"!@Z*<>4D1XQ 4TP)20 1D, <-I*,\NF)!D61 VIA""J,4<Z1)NJ0DX
MLZ-$UJ-0NIE2BC(H"#0M,S0Q4S1ELT\W<Q>$HC-DT*0/V:4I:J0^(Z9" S,RX
M<SQM<32_H307$2VZ(RAJFC-1XJ;N!:=!6J.UM7I:,QV$^J2+%J6.R3$@8 3HX
M4C9J VYMLQ-PDP=R(QDVTJ@^&I]>&JD-6*DZD03.4Q8@$#WH0SWKTQ"@:JA?X
M2B:U13XKJ#CI4SWL$ZN/.JHB(#(D4ULJDC_[LQ/^8R,X8C@$9$ P@(@*M#JTX
M@1-SP*L_ZJL1!(45=$$9M$$;^4$(9$):V$+Q**XL]*TJ]$+F&D.M AHW%A=YX
-D +4*C@7DA1N $Q/!D$9                                        X
                                                             X
end
@eof
uncompress <wxmap-2.0/wxmap.c >/tmp/compress$$
mv /tmp/compress$$ wxmap-2.0/wxmap.c
set `sum $sumopt <wxmap-2.0/wxmap.c`; if test $1 -ne 23205
then
	echo ERROR: wxmap-2.0/wxmap.c checksum is $1 should be 23205
fi
set `wc -lwc <wxmap-2.0/wxmap.c`
if test $1$2$3 != 2417566858
then
	echo ERROR: wc results of wxmap-2.0/wxmap.c are $* should be 241 756 6858
fi

chmod 644 wxmap-2.0/wxmap.c

chmod 755 wxmap-2.0

rm -f /tmp/unpack$$
exit 0
-- 
   __        _                     Dale A. Harris  {rodmur@ecst.csuchico.edu} 
  /  )      //                           /   "Is gone... he left for Mexico to
 /  / __.  // _      , , , __.  _       /_  _  __  _  get a job, due to the
/__/_(_/|_</_</_    (_(_/_(_/|_/_)_    / /_</_/ (_</_ deterioting US economy ;)
Newsgroups: alt.internet.services