Last active
December 26, 2015 18:49
-
-
Save glidenote/7197223 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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