File retrieval problems

HI

I am struggling with how to do the following in Ruby:

go to a url
and download a zip file from the site to a location on my hard
drive

then unzip the file to a folder

I need to do this on a windows
platform.

I’m guessing I should use try to use the HTTP module in some
way to do this? But I can’t seem to work out how to grab the zip file
rather than an html page?
The unzipping I guess could be done with
system calls, unless Ruby has a way to unzip stuff?

All help greatly
appreciated

Kingsley

HI

I am struggling with how to do the following in Ruby:

go to a url
and download a zip file from the site to a location on my hard
drive

then unzip the file to a folder

I need to do this on a windows
platform.

I'm guessing I should use try to use the HTTP module in some
way to do this? But I can't seem to work out how to grab the zip file
rather than an html page?
The unzipping I guess could be done with
system calls, unless Ruby has a way to unzip stuff?

you can use rubyzip to access data in your zip files

http://raa.ruby-lang.org/list.rhtml?name=rubyzip

which depends on ruby-zlib

http://raa.ruby-lang.org/list.rhtml?name=ruby-zlib

···

On Wed, Jun 04, 2003 at 05:57:47PM +0900, kingsley@icecode.org wrote:

All help greatly
appreciated

Kingsley


Benoît PIERRE pierre_b@epita.fr
Étudiant EPITA GISTR promo 2004

.-------------------------------------. [GnuPG FingerPrint]

Avoid the Gates of Hell. Use Linux | BDEE523CB7AE6D9DB4C0
_____________________________________| 8B0288677E698B65CC35

Break it down into small steps:

Get the html file
Parse it to get the url for the zip file
get the zip file
use zuby-zip to manipulate the zip file

-Vivek

···

On Wed, Jun 04, 2003 at 05:57:47PM +0900, kingsley@icecode.org wrote:

HI

I am struggling with how to do the following in Ruby:

go to a url
and download a zip file from the site to a location on my hard
drive

then unzip the file to a folder

I need to do this on a windows
platform.

I'm guessing I should use try to use the HTTP module in some
way to do this? But I can't seem to work out how to grab the zip file
rather than an html page?
The unzipping I guess could be done with
system calls, unless Ruby has a way to unzip stuff?