- Old Hippy Needs Help With Clouds
[1/6] from: jimbo:sc:starcat:ne:jp at: 4-Jun-2001 16:32
Hi guys,
I wanna render a really cool earth with animated atmospheric cloud layers!
Ok... I know Lava (Errr.. REBOL) doesn't render worlds but it can help!
Here's how:
There's a wether site that posts fixed orbit sat. photos of the earth's cloud layer at
30 minute intervals. They're always posted to the same URL but DL in my browser ("Save
Image As") as different file names:
GOES04452001155k2wqmz.jpg
GOES04152001155ernztH.jpg
GOES03452001155EQIk05.jpg
GOES02452001155jLxZMS.jpg
...
etc.
I want REBOL to:
1.. Grab the image off the site.
2.. Save it to Disk under supplied filename or specified sequence name.
3.. Wait exactly 30 minutes.
4.. Repeat until aborted.
I did some beta testing befor the initial pubilc release of REBOL so I'm pretty sure
this is doable but I haven't looked at it again since and feel a bit lost... Sorry if
this has already been discussed here. Is there some example code I could look at that
would do this from a URL like:
http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=Global Composite&x=0&y=0&map=none&zoom=1&width=1000&height=500&quality=100
This has got to be what? Maybe 5 to 10 lines of code... The only problem is it's 5
or 10 lines of code I don't know and I looking for a quick fix.
I would be very very greatful for any input you could provide.
--
TIA
James Dean Prentice III
Just Some Old Hippy,
Hang'en out in Japan
[2/6] from: gchiu:compkarori at: 4-Jun-2001 20:19
> This has got to be what? Maybe 5 to 10 lines of code...
> The only problem is it's 5 or 10 lines of code I don't
> know and I looking for a quick fix.
Try this, a very specific solution ( watch for line wrap)
Rebol []
root: http://wwwghcc.msfc.nasa.gov
url: http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=Global Composite&x=0&y=0&map=none&zoom=1&width=1000&height=500&quality=100
forever [
page: read url
if parse page [ thru "IMG SRC=^"" copy imageurl to {"} to
end ] [
jpeg: join root imageurl
filename: to-file last parse/all image "/"
write/binary filename read/binary jpeg
print [ "downloaded " filename ]
]
wait 00:30:00
]
--
Graham Chiu
[3/6] from: cyphre:volny:cz at: 4-Jun-2001 10:58
Hello Hippy ;-)
REBOL []
if not exists? %pictures/ [
make-dir %pictures/
]
forever [
page: read
http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=Global Composite&x
=0&y=0&map=none&zoom=1&width=1000&height=500&quality=100
parse page [thru "SRC=^"/" copy pic-path to "^" WIDTH" to end]
write/binary join %pictures/ to-file last parse pic-path "/" read join
to-url http://wwwghcc.msfc.nasa.gov/ pic-path
wait 00:30:00
]
this script creates directory pictures in place where is executed and save
images after 30 mins.
I hope it will work but if you have any problems with that let me know
i've written it in a few minutes and not tested much)
Have fun,
Cyphre
----- Original Message -----
From: Jimbo <[jimbo--sc--starcat--ne--jp]>
To: <[rebol-list--rebol--com]>
Sent: Monday, June 04, 2001 9:32 AM
Subject: [REBOL] - Old Hippy Needs Help With Clouds
> Hi guys,
>
> I wanna render a really cool earth with animated atmospheric cloud layers!
>
> Ok... I know Lava (Errr.. REBOL) doesn't render worlds but it can help!
>
> Here's how:
>
> There's a wether site that posts fixed orbit sat. photos of the earth's
cloud layer at 30 minute intervals. They're always posted to the same URL
but DL in my browser ("Save Image As") as different file names:
> GOES04452001155k2wqmz.jpg
> GOES04152001155ernztH.jpg
<<quoted lines omitted: 8>>
> 4.. Repeat until aborted.
> I did some beta testing befor the initial pubilc release of REBOL so I'm
pretty sure this is doable but I haven't looked at it again since and feel a
bit lost... Sorry if this has already been discussed here. Is there some
example code I could look at that would do this from a URL like:
>
http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=Global Composite&x
=0&y=0&map=none&zoom=1&width=1000&height=500&quality=100
[4/6] from: gchiu:compkarori at: 4-Jun-2001 20:57
> filename: to-file last parse/all image "/"
Oops, should read:
filename: to-file last parse/all imageurl "/"
--
Graham Chiu
[5/6] from: jimbo::sc::starcat::ne::jp at: 4-Jun-2001 18:08
Wow!!! That was fast! And it looks great too!!!
I'm off to try it... letcha know in a few hrs. ;)
THANKYOU VERY MUCH!!!
What a nice list :)
[6/6] from: cyphre:volny:cz at: 4-Jun-2001 11:02
Ups little bug in my script :-)
Here is working version:
REBOL []
if not exists? %pictures/ [
make-dir %pictures/
]
forever [
page: read
http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=Global Composite&x
=0&y=0&map=none&zoom=1&width=1000&height=500&quality=100
parse page [thru "SRC=^"/" copy pic-path to "^" WIDTH" to end]
write/binary join %pictures/ to-file last parse pic-path "/" read/binary
join to-url http://wwwghcc.msfc.nasa.gov/ pic-path
wait 00:30:00
]
Cyphre
----- Original Message -----
From: Jimbo <[jimbo--sc--starcat--ne--jp]>
To: <[rebol-list--rebol--com]>
Sent: Monday, June 04, 2001 9:32 AM
Subject: [REBOL] - Old Hippy Needs Help With Clouds
> Hi guys,
>
> I wanna render a really cool earth with animated atmospheric cloud layers!
>
> Ok... I know Lava (Errr.. REBOL) doesn't render worlds but it can help!
>
> Here's how:
>
> There's a wether site that posts fixed orbit sat. photos of the earth's
cloud layer at 30 minute intervals. They're always posted to the same URL
but DL in my browser ("Save Image As") as different file names:
> GOES04452001155k2wqmz.jpg
> GOES04152001155ernztH.jpg
<<quoted lines omitted: 8>>
> 4.. Repeat until aborted.
> I did some beta testing befor the initial pubilc release of REBOL so I'm
pretty sure this is doable but I haven't looked at it again since and feel a
bit lost... Sorry if this has already been discussed here. Is there some
example code I could look at that would do this from a URL like:
>
http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=Global Composite&x
=0&y=0&map=none&zoom=1&width=1000&height=500&quality=100
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted