Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# Script that wraps grabbing and selecting stuff from HTML page via CSS selectors
# Created 2009-10-01 by Jesper Rønn-Jensen, www.justaddwater.dk
#
# For usage, run parsepage.rb without arguments.
#
# Feel free to modify, fork and improve as long as you commit your changes back to me :)
def usage
<<-EOF #.gsub(' ', '')
=== USAGE ===
POST http://rubyurl.com/api/links
<link>
<website_url>http://github.com/robbyrussell</website_url>
</link>