cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl automation narative

From: Paul William <pwilliam_at_sbcglobal.net>
Date: Fri, 26 Sep 2003 23:04:34 -0700 (PDT)

First some narative...
 
I tried for two weeks to get curl running in a Win32 environment and failed. Too many separate things to get working together: a C compiler, gnu programming environment, perl, ssl librarys, .dlls, make, etc...
 
So I decided to turn my PC into a unix box instead. Burned a boot CD-ROM from an .iso image available (free) from freebsd.org. Booted the computer using it into FreeBSD 4.8. Partway through the FreeBSD Unix installation, I realized I should have burned a complete cd, not the minimal package, as I was missing the ported application package collections. Not to worry, as the installer prompts me: "The files you want are not on your CD media... Want me (computer speaking) to fetch all the necessary files from the freeBSD ftp server? Sure!! minutes later, I prompted it to download and install the latest Curl SSL package, and then exited the BSD installer, and Unix worked, Curl worked, Amazing! So to partially answer the guy who just posted with Win32 Curl installation problems, dump Win32 and install FreeBSD Unix! It's awesome!
 
Now on to my newbie question: I want to download a satelite weather image every hour from NOAA and save the image file with a unique name (despite the posted image always being called WCIR.JPG), so I imagine I would want to invoke curl as follows:
 
curl -O http://www.goes.noaa.gov/GIFS/WCIR.JPG
and then do something (in Perl?) to rename the file to a unique name? Ideally the name would have the date and time captured in it. Or is there a curl saved file re-naming or unique naming feature?
 
If I want to run that curl statement every hour, would it be best to schedule it to run as a crontab job?
 
I'm trying to learn Perl too, so would I be best off doing everything (file renaming and perl invocation) in Perl? Any syntax scripting help available?
 
2nd newbie question: So I fetched a .html doc from somesite.com. I don't really want all the formatting junk. I just want the imbedded data. Is there a Curl option to strip out the data from the html code?
 
Thanks for being.
 
- Paul William.
 
   

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-27