gifme 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -0
- data/Rakefile +1 -1
- data/bin/gifme +5 -4
- data/gifme.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -48,6 +48,11 @@ take a gif you find online and give it that `--reverse` look:
|
|
48
48
|
|
49
49
|
gifme http://tumblr.com/some-crazy.gif --reverse
|
50
50
|
|
51
|
+
You can also resize shit. We default to 500 pixels, but do whatever the fuck
|
52
|
+
you want.
|
53
|
+
|
54
|
+
gifme http://tumblr.com/some-crazy.gif --width=1000
|
55
|
+
|
51
56
|
For other options, check out the help:
|
52
57
|
|
53
58
|
gifme -h
|
data/Rakefile
CHANGED
data/bin/gifme
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'optparse'
|
4
4
|
require 'open-uri'
|
5
|
+
require 'fileutils'
|
5
6
|
|
6
7
|
def escape(str)
|
7
8
|
String(str).gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/n, '\\').
|
@@ -12,7 +13,7 @@ end
|
|
12
13
|
options = {
|
13
14
|
:output => "#{ENV['HOME']}/Desktop/animated.gif",
|
14
15
|
:reverse => false,
|
15
|
-
:
|
16
|
+
:width => 500,
|
16
17
|
:delay => 20,
|
17
18
|
:cloudapp => system("which cloudapp 2>&1 > /dev/null")
|
18
19
|
}
|
@@ -39,8 +40,8 @@ parser = OptionParser.new do |opts|
|
|
39
40
|
options[:delay] = delay
|
40
41
|
end
|
41
42
|
|
42
|
-
opts.on("--
|
43
|
-
options[:
|
43
|
+
opts.on("-w", "--width PIXELS", "Set the width of the image (default is 500px)") do |width|
|
44
|
+
options[:width] = width
|
44
45
|
end
|
45
46
|
|
46
47
|
opts.on("-h", "--help", "Show this message") do
|
@@ -87,7 +88,7 @@ files = files.collect{|a| escape a}
|
|
87
88
|
cmd = "convert"
|
88
89
|
cmd += " -delay #{options[:delay]}"
|
89
90
|
cmd += " -loop 0"
|
90
|
-
cmd += " -resize
|
91
|
+
cmd += " -resize #{options[:width]}"
|
91
92
|
cmd += " -layers OptimizeTransparency"
|
92
93
|
cmd += " #{files.join(' ')}"
|
93
94
|
|
data/gifme.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'gifme'
|
16
|
-
s.version = '0.0.
|
16
|
+
s.version = '0.0.5'
|
17
17
|
s.date = '2011-05-23'
|
18
18
|
s.rubyforge_project = 'gifme'
|
19
19
|
|
metadata
CHANGED