Skip to content

Instantly share code, notes, and snippets.

@glidenote
Last active December 26, 2015 18:49
Show Gist options
  • Save glidenote/7197223 to your computer and use it in GitHub Desktop.
Save glidenote/7197223 to your computer and use it in GitHub Desktop.
diff --git a/lib/pbl/cli.rb b/lib/pbl/cli.rb
index 5bfe7d3..2482782 100644
--- a/lib/pbl/cli.rb
+++ b/lib/pbl/cli.rb
@@ -49,10 +49,15 @@ module Pbl
end
def run
- abort "Usage: pbl TAG" if @argv.empty?
page unless $test_env
- @pinboard.posts(:tag => @argv.join(',')).each do |post|
- puts "[%s] %s %s" % [post[:time].strftime("%Y/%m/%d").cyan, post[:description].cut, post[0].green]
+ if @argv.empty?
+ @pinboard.recent(:count => 150).each do |post|
+ puts "[%s] %s %s" % [post[:time].strftime("%Y/%m/%d").cyan, post[:description].cut, post[0].green]
+ end
+ else
+ @pinboard.posts(:tag => @argv.join(',')).each do |post|
+ puts "[%s] %s %s" % [post[:time].strftime("%Y/%m/%d").cyan, post[:description].cut, post[0].green]
+ end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment