holman/gifme — pull request #11 by shakaran (2013-04-01 08:18:12+00:00)
Title: Minor fixing and improvements of options

This pull request fix/add the following:

* Add -v option for show program version.

Example:

$ gifme -v
gifme 0.0.8

* Add -q option for silence program output

* Fix bug with zero arguments that produces nil:NilClass (NoMethodError)

Before to fixing it displays:

$ gifme
/var/lib/gems/1.9.1/gems/gifme-0.0.8/bin/gifme:65:in `': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/local/bin/gifme:23:in `load'
from /usr/local/bin/gifme:23:in `

'

Nows shows the usage and help.

* Improve usage message displaying the options

The current ouput is like:

$ gifme -h
Usage: gifme [-h] [-r] [-o /path/to/output] [-d DELAY] [-w PIXELS] [-q] [-v] FILES [FILES ...]

FILES can be listed out, like `file1.jpg file2.jpg`, or it
can be a normal shell glob, like `*.jpg`.

Options:
-r, --reverse Reverse the GIF to make it loopable
-o, --output /path/to/output Set the animation's output directory
-d, --delay DELAY Set the delay between frames (default: 20)
-w, --width PIXELS Set the width of the image (default is 500px)
-v, --version Shows the program version
-q, --quiet Don't print status messages to stdout
-h, --help Show this message

Happy gifming!