Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Using Rio from Ruby to easily save a Web page to file (See related posts)

Found at http://www.juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/

# (sudo) gem install rio
require 'rubygems'
require 'rio'
# open an URI an copy the content into a file
rio('http://www.juretta.com/') > rio('juretta_index.html')


Cool syntax!

Comments on this post

bryceb posts on Nov 14, 2006 at 19:47
I knew there must be an easy way to do this with ruby.

You need to create an account or log in to post comments to this site.


Click here to browse all 4861 code snippets

Related Posts