Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

screenly is now sly

  • Loading branch information...
commit 1e0fb38df2f8280423a0041a47effc6eae4af518 1 parent 55178bc
Ryan Carver authored

Showing 1 changed file with 20 additions and 20 deletions. Show diff stats Hide diff stats

  1. +20 20 bin/{screenly → sly}
40 bin/screenly → bin/sly
... ... @@ -1,13 +1,13 @@
1 1 #!/usr/bin/env ruby
2 2 #
3   -# screenly
  3 +# sly
4 4 # Ryan Carver / @rcarver
5 5 #
6   -#/ screenly uploads screenshots to CloudApp. And more.
  6 +#/ sly uploads screenshots to CloudApp. And more.
7 7 #/
8 8 #/ * Transports images directly from your clipboard to CloudApp.
9 9 #/ * Optionally wraps the cl.ly url in a markdown image tag.
10   -#/ * Take screenshots for you. Run screenly, take the shot, paste the link.
  10 +#/ * Take screenshots for you. Run sly, take the shot, paste the link.
11 11 #/
12 12 #/ Dependencies:
13 13 #/
@@ -18,36 +18,36 @@
18 18 #/
19 19 #/ Take a screenshot and upload it (the default with no other arguments).
20 20 #/
21   -#/ $ screenly
22   -#/ <screenshotting in interactive mode. spacebar toggles betwen selection and window modes.>
  21 +#/ $ sly
  22 +#/ <screenshotting in interactive mode. spacebar toggles betwen selection and window modes>
23 23 #/ <in your clipboard: ![](http://cl.ly/...)>
24 24 #/
25 25 #/ Upload an image in your clipboard and get a markdown image tag.
26 26 #/
27 27 #/ <take a screenshot and store it on the clipboard (hold the ctrl key)>
28   -#/ $ screenly -p -m awesome
  28 +#/ $ sly -p -m awesome
29 29 #/ <in your clipboard: ![awesome](http://cl.ly/... "awesome")>
30 30 #/
31 31 #/ Upload multiple files on disk and get markdown for each one.
32 32 #/
33   -#/ $ screenly -m one -m two file1.png file2.png
  33 +#/ $ sly -m one -m two file1.png file2.png
34 34 #/ <in your clipboard: ![one](http://cl.ly/... "one"),![two](http://cl.ly/... "two")>
35 35 #/
36 36 #/ Mix-and-match clipboard and files.
37 37 #/
38 38 #/ <take a screenshot and store it on the clipboard (hold the ctrl key)>
39   -#/ $ screenly -p file1.png
  39 +#/ $ sly -m -p file1.png
40 40 #/ <in your clipboard: ![](http://cl.ly/...),![](http://cl.ly/...)>
41 41 #/
42 42 #/ Mix and match clipboard and files, with markdown.
43 43 #/
44 44 #/ <take a screenshot and store it on the clipboard (hold the ctrl key)>
45   -#/ $ screenly -p -m clipped file1.png
  45 +#/ $ sly -p -m clipped file1.png
46 46 #/ <in your clipboard: ![clipped](http://cl.ly/... "clipped"),![](http://cl.ly/...)>
47 47 #/
48 48 #/ Use '--' to separate args and files (useful to use markdown with no text with a file)
49 49 #/
50   -#/ $ screenly -m -- file1.png
  50 +#/ $ sly -m -- file1.png
51 51 #/ <in your clipboard: ![](http://cl.ly/...)>
52 52
53 53 require 'fileutils'
@@ -59,8 +59,8 @@ require 'optparse'
59 59 @markdown = [nil]
60 60 @test = !!ENV['TEST'] # Test mode. Don't upload to CloudApp.
61 61
62   -# If no arguments are given, capture a screenshot and copy it to the clipboard
63   -# as markdown.
  62 +# If no arguments are given, change the defaults to capture a screenshot and
  63 +# copy it to the clipboard as markdown.
64 64 if ARGV.empty?
65 65 @capture = "i"
66 66 @markdown = [nil]
@@ -88,12 +88,12 @@ OptionParser.new(ARGV) { |opts|
88 88 opts.on("-h", "--help", "Show the help") do
89 89 about
90 90 puts
91   - puts "Usage: screenly <options> [<file>...]"
92   - puts " screenly"
93   - puts " screenly -c"
94   - puts " screenly -p"
95   - puts " screenly -c -m 'describe image'"
96   - puts " screenly -m 'describe image' file.png another.png"
  91 + puts "Usage: sly <options> [<file>...]"
  92 + puts " sly"
  93 + puts " sly -c"
  94 + puts " sly -p"
  95 + puts " sly -c -m 'describe image'"
  96 + puts " sly -m 'describe image' file.png another.png"
97 97 puts opts.to_s
98 98 exit 2
99 99 end
@@ -122,7 +122,7 @@ if @paste
122 122 if @markdown.any?
123 123 tempfile = tf "#{@markdown.first.downcase.gsub(/\s+/, '-')}.png"
124 124 else
125   - tempfile = tf "screenly-paste.png"
  125 + tempfile = tf "sly-paste.png"
126 126 end
127 127
128 128 # pngpaste writes to stderr on error but still returns
@@ -137,7 +137,7 @@ end
137 137
138 138 if @capture
139 139
140   - tempfile = tf "screenly-capture.png"
  140 + tempfile = tf "sly-capture.png"
141 141
142 142 # Run screencapture.
143 143 `screencapture -#{@capture} -m -tpng #{tempfile}`

0 comments on commit 1e0fb38

Please sign in to comment.
Something went wrong with that request. Please try again.