gifme 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/README.md +5 -0
  2. data/Rakefile +1 -1
  3. data/bin/gifme +5 -4
  4. data/gifme.gemspec +1 -1
  5. 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
@@ -13,7 +13,7 @@ def name
13
13
  end
14
14
 
15
15
  def version
16
- "0.0.4"
16
+ "0.0.5"
17
17
  end
18
18
 
19
19
  def date
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
- :resize => true,
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("--noresize", "Don't resize the final animation (set to 500px wide)") do |nrs|
43
- options[:resize] = false
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 500" if options[: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.4'
16
+ s.version = '0.0.5'
17
17
  s.date = '2011-05-23'
18
18
  s.rubyforge_project = 'gifme'
19
19
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gifme
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Zach Holman