Skip to content

Commit

Permalink
A tiny help panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Alves Vieira committed Dec 21, 2011
1 parent f956332 commit 5fe2d39
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/tiny_url
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])

help = <<HELP
A gem for tinifying urls
Basic Command Line Usage:
tiny_url http://accidentalchinesehipsters.tumblr.com/ # Returns the tinified version of the url, copies it to the clipboard and opens the webpage in your browser.
HELP

require 'tiny_url'

if ARGV.size != 1
puts "specify *ONE* the url to be tinified"
if ARGV.size.zero?
puts help
else
TinyUrl.tinify(ARGV[0])
end

0 comments on commit 5fe2d39

Please sign in to comment.