Skip to content

Instantly share code, notes, and snippets.

@bragi
Created October 31, 2008 14:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bragi/21315 to your computer and use it in GitHub Desktop.
Save bragi/21315 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'rubygems'
require 'hpricot'
require 'open-uri'
file = open(ARGV[1]) if ARGV[1]
file ||= STDIN
doc = Hpricot(file)
puts doc / ARGV[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment