Permalink
Browse files

tweak example scripts

  • Loading branch information...
1 parent 9dfdebc commit 4bedf6cd557dff7787cbc87bd29a9f7a99e6394f @mislav committed Aug 15, 2010
Showing with 4 additions and 3 deletions.
  1. +2 −1 README.md
  2. +1 −1 examples/delicious.rb
  3. +1 −1 examples/twitter.rb
View
@@ -28,7 +28,8 @@ Nibbler
There are sample scripts in the "examples/" directory; run them with:
- ruby -Ilib -rubygems examples/<script>.rb
+ ruby -Ilib -rubygems examples/delicious.rb
+ ruby -Ilib -rubygems examples/tweetburner.rb > output.csv
[See the wiki][wiki] for more on how to use *Nibbler*.
View
@@ -16,7 +16,7 @@ class Bookmark < Nibbler
element './/h4/a/@href' => :url
# tags are plural
- elements 'ul.tag-chain li span' => :tags
+ elements 'ul.tag-chain .tagItem' => :tags
# dates are in form "22 OCT 09"
element '.dateGroup span' => :date, :with => lambda { |span|
View
@@ -25,7 +25,7 @@ class Twitter < NibblerJSON
twitter = Twitter.parse(DATA.read)
twitter.tweets.each do |tweet|
- puts "@%s: %s" % [tweet.author.username, tweet.created_at.inspect]
+ puts "@%s: %s [%s]" % [tweet.author.username, tweet.text, tweet.created_at]
puts
end

0 comments on commit 4bedf6c

Please sign in to comment.