Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/todd-a-jacobs/gravatar-generator
Use the gravtar.com public API to retrieve or generate avatars.
https://github.com/todd-a-jacobs/gravatar-generator
Last synced: about 2 months ago
JSON representation
Use the gravtar.com public API to retrieve or generate avatars.
- Host: GitHub
- URL: https://github.com/todd-a-jacobs/gravatar-generator
- Owner: todd-a-jacobs
- Created: 2010-10-23T16:40:00.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-08-23T01:48:08.000Z (over 12 years ago)
- Last Synced: 2023-03-11T07:43:13.986Z (almost 2 years ago)
- Language: Ruby
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
Awesome Lists containing this project
README
== Name
gravgen.rb== Version
$Id$== Purpose
Use the gravtar.com public API to retrieve or generate avatars.== Features
* Works as both a library and as a standalone executable.
* Works out of the box. No programming required!
* Does NOT require rubygems, unless you want to run the included
rake tasks or rspec tests. Neither is necessary for routine
operation.
* Self-documenting through the magic of RDoc::usage.== Usage
gravgen.rb [OPTIONS] [FILENAME]--help, -h:
Show complete documentation.
--license, -l:
Display license.
--usage, -u:
Show program options.
--version, -v:
Display this program's version information.--email , -e :
Email address to hash for the avatar.
--filename , -f :
Output filename for avatar.
--format , -t :
Valid code for an avatar format. Defaults to 'identicon.'
--size , -s
Valid image size. Defaults to '80.'== Examples
# Create a random 80x80 avatar, display its introspected values,
# and store it to disk.
#
# HINT: reuse the value of @email if you want to recreate a
# particular random avatar at a different size later on!
gravgen.rb# Save identicon for email address [email protected] to a foo.png
# file.
gravgen.rb -e [email protected] foo.png# Create wavatar for [email protected] on stdout.
gravgen.rb -e [email protected] -f- > /tmp/wavatar.png# Create random 512x512 monsterid.
gravgen.rb -s 512 -t monsterid /tmp/monsterid.png# Use email address encoded into the filename of a random image as
# the basis for a resized copy.
gravgen.rb --size 32 --email $(
ls avatar_31765_d0d632d0-aecb-4f75-badf-0a9b8d63c891.png |
cut -d- -f2- |
cut -d. -f1
)== Errorlevels
0 = Success
1 = Failure
99 = Help/Usage== Copyright:
Copyright 2010, 2012 Todd A. Jacobs
All Rights Reserved== License
Released under the GNU General Public License (GPL)
http://www.gnu.org/copyleft/gpl.htmlThis 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.