-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9ac6f3d
Showing
17 changed files
with
1,504 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
*~ | ||
*.pyc | ||
.DS_Store | ||
*.cprof | ||
*.profile | ||
*.log | ||
pylint* | ||
*.tmproj | ||
build | ||
MANIFEST | ||
dist | ||
*egg* | ||
*gz | ||
.buildpath | ||
.externalToolBuilders | ||
.project | ||
.settings | ||
*.tar.gz | ||
.pydevproject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: python | ||
python: | ||
- "3.0" | ||
- "3.2" | ||
- "3.3" | ||
# command to install dependencies | ||
install: | ||
- pip install . --use-mirrors | ||
- pip install -r requirements.txt --use-mirrors | ||
# command to run tests | ||
script: nosetests | ||
- test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
------------------------- | ||
Authors | ||
------------------------- | ||
|
||
* `Ángel Guzmán Maeso`_ | ||
|
||
- Maintainer. | ||
|
||
* `Zach Holman`_ | ||
|
||
- Original author of ruby script. | ||
|
||
.. _Ángel Guzmán Maeso: https://github.com/shakaran | ||
.. _Zach Holman: https://github.com/holman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Version 0.1 | ||
------------ | ||
|
||
- Create a port in python of ``gifme`` called ``pygifme``. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# pygifme | ||
|
||
 | ||
|
||
[](http://travis-ci.org/shakaran/pygifme) | ||
|
||
## Fucking animations. You need them. | ||
|
||
pygifme is a simple command line tool to generate animated GIFs. It is a python port from the original ruby script gifme created by [@holman](https://twitter.com/holman) | ||
|
||
## Installation | ||
|
||
Install pygifme: | ||
|
||
pip3 install pygifme | ||
|
||
You also can install via setup.py file: | ||
|
||
python3 setup.py install | ||
|
||
You'll also need to install ImageMagick. | ||
|
||
On GNU/LINUX Debian systems: | ||
|
||
sudo apt-get install imagemagick | ||
|
||
On OS X, this is easy using Homebrew: | ||
|
||
brew install imagemagick | ||
|
||
This script is for Python >= 3.0. It also needs python module argcomplete if | ||
you wish pygifme autocompletion in command line. | ||
|
||
You can install with: | ||
|
||
sudo pip3 install argcomplete | ||
|
||
Or via requirements.txt file: | ||
|
||
sudo pip3 install -r requirements.txt --use-mirrors | ||
|
||
## Usage | ||
|
||
pygifme ~/Desktop/1.png ~/Desktop/2.png | ||
You now have a handsome animation at ~/Desktop/animated.gif | ||
|
||
You can also glob, of course: | ||
|
||
pygifme ~/Desktop/*.jpg | ||
You now have a handsome animation at ~/Desktop/animated.gif | ||
|
||
## CloudApp | ||
|
||
Once your animation is finished up, we'll try to upload it to | ||
[CloudApp](http://www.getcloudapp.com). If you have | ||
[`cloudapp`](https://github.com/holman/dotfiles/blob/master/bin/cloudapp) | ||
script installed, we'll use that, otherwise we'll just skip this whole step. | ||
|
||
## Super Advanced Usage | ||
|
||
On some gifs, it's nice to have a smooth loop, so when it ends there's not a | ||
jarring leap from the last frame to the first frame again. Use the `--reverse` | ||
switch to create the animation like normal, and then reverse the frames and add | ||
them to the animation so it looks like one smooth motion and back again. | ||
|
||
pygifme FILES --reverse | ||
|
||
If you pass in a URL of a gif instead of FILES, we'll download that gif, split | ||
it into its constituent frames, and let you recreate it. For example, you could | ||
take a gif you find online and give it that `--reverse` look: | ||
|
||
pygifme http://tumblr.com/some-crazy.gif --reverse | ||
|
||
You can also resize shit. We default to 500 pixels, but do whatever the fuck | ||
you want. | ||
|
||
pygifme http://tumblr.com/some-crazy.gif --width=1000 | ||
|
||
For other options, check out the help: | ||
|
||
pygifme -h | ||
|
||
## History | ||
|
||
If you're curious, gifme was initially a few-line shell script in [Zach Holman | ||
dotfiles](https://github.com/holman/dotfiles). Eventually it became clear that | ||
animation is a fundamental part of our society, and I split it out into its own | ||
tiny project. | ||
|
||
If you're curious, Zach Holman featured the older gifme version [in a | ||
screencast](http://zachholman.com/2011/01/automating-inefficiencies/) Zach Holman made | ||
that describes how animated gifs are an integral part of working at GitHub. | ||
|
||
I made this python port just for fun and practice ruby to python porting. | ||
|
||
## Running unit tests | ||
|
||
This is a simple script, but it can have unexpect behaviour doing weird things | ||
with ImageMagick backend. So, if you want ensure the common behaviour, then you | ||
can run the unit testing battery with: | ||
|
||
python3 -m unittest test | ||
|
||
Also from setup.py (recommended): | ||
|
||
sudo python3 setup.py test | ||
|
||
## Much Love | ||
|
||
From [@holman](https://twitter.com/holman). Zach Holman loves you. | ||
|
||
## About | ||
|
||
Mantainer [@shakaran](https://twitter.com/shakaran). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -*- coding: utf-8; tab-width: 4; mode: python -*- | ||
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -* | ||
# vi: set ft=python sts=4 ts=4 sw=4 noet | ||
|
||
# pygifme is a simple command line tool to generate animated GIFs. | ||
# It is a python port from the original ruby script gifme created by | ||
# Zach Holman | ||
|
||
# Copyright (C) 2013 by Ángel Guzmán Maeso, shakaran at gmail dot com | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
||
__package__ = 'pygifme' | ||
__version__ = '0.1' | ||
__all__ = ['.pygifme'] | ||
|
||
def main(): # For setuptools entry point | ||
from . import pygifme | ||
pygifme.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
# pygifme is a simple command line tool to generate animated GIFs. | ||
# It is a python port from the original ruby script gifme created by | ||
# Zach Holman | ||
|
||
# Copyright (C) 2013 by Ángel Guzmán Maeso, shakaran at gmail dot com | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
||
pygifme.py $@ |
Oops, something went wrong.