Skip to content

Instantly share code, notes, and snippets.

@jaspertandy
Created December 1, 2011 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaspertandy/1419991 to your computer and use it in GitHub Desktop.
Save jaspertandy/1419991 to your computer and use it in GitHub Desktop.
AJN Ipsum TextExpander Shell Script
#!/usr/bin/env ruby
require 'net/http'
require 'uri'
require 'nokogiri'
html = Nokogiri::HTML( Net::HTTP.get( URI.parse( 'http://old.jamesmoss.co.uk/ajn.php' ) ) )
out = []
html.xpath( '//p' ).to_a.each do |p|
out.push p.to_s
end
puts out.join("\n\n").strip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment