The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
HtmlClipping 0.1.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Francis Hwang

Posts: 130
Nickname: francis
Registered: Jul, 2004

Francis Hwang is the Director of Technology at Rhizome.org.
HtmlClipping 0.1.0 Posted: Aug 28, 2005 9:06 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Francis Hwang.
Original Post: HtmlClipping 0.1.0
Feed Title: Francis Hwang's site: ruby
Feed URL: http://fhwang.net/syndicate/ruby.atom
Feed Description: Author & artist Francis Hwang's personal site.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Francis Hwang
Latest Posts From Francis Hwang's site: ruby

Advertisement

More Ruby libs: I’ve just released the first version of HtmlClipping. HtmlClipping reads an HTML page that has a link pointing to a particular URI. It removes most HTML markup, bolds the link text, and trims the resulting text to a fixed number of characters. I developed it to help me track referers to my website, though I suppose it might have other uses.

For example, the following script gets the HTML at http://rubyforge.org/credits/, and forms an excerpt around the link to http://www.rubycentral.org/pledge/.

require 'htmlclipping'
require 'net/http'
contents = ''
Net::HTTP.start( 'rubyforge.org' ) do |http|
 response = http.get '/credits/'
 contents = response.body
end
clipping = HtmlClipping.new(
 contents, 'http://www.rubycentral.org/pledge/', 500
)
puts clipping.to_s
=> "… RubyForge takes time, effort, and money. Many thanks to the
 folks listed below who are making it possible! 
If RubyForge has been helpful to you, and you want to give something back to the Ruby community, please consider supporting RubyCentral. Thanks!
InfoEther, Inc purchased the RubyForge hardware and provides system administration support.
Several folks provide file mirrors to help share the bandwidth load:
Evan Webb
Dennis Oelkers
Austin …"

Read: HtmlClipping 0.1.0

Topic: Weird keyboard behavior Previous Topic   Next Topic Topic: Another bad thing about gizmo on Linux

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use