Skip to content
RoboHash.org
JavaScript CSS Python HTML Shell
Branch: master
Clone or download

Latest commit

e1ven Merge pull request #42 from mrts/patch-1
Fix #41, UnicodeDecodeError during setup in Windows
Latest commit d690273 May 15, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
robohash PNGcrush Aug 28, 2019
.gitignore Include License Jan 3, 2012
LICENSE.txt package test Dec 4, 2013
README.rst Merge branch 'master' of github.com:e1ven/Robohash Aug 28, 2019
requirements.txt Fix the sorting issue I thought was fixed years ago. Sep 2, 2015
setup.cfg Update packaging information Jul 13, 2017
setup.py Fix #41, UnicodeDecodeError during setup in Windows May 15, 2020

README.rst

RoboHash

The source code for RoboHash.org.

It basically copy/pastes various robot pictures together, using bits from the SHA hash. It's not perfect, and not entirely secure, but it gives a good gut-check to "Hey, this SHA is wrong."

Install

Just the library:

$ pip install robohash

Or if you also want the web frontend:

$ pip install robohash[web]

Usage

from robohash import Robohash

hash = "whatever-hash-you-want"
rh = Robohash(hash)
rh.assemble(roboset='any')
with open("path/to/new/file.png", "wb") as f:
    rh.img.save(f, format="png")

Robosets

RoboHash comes with five image sets, named "set1", "set2", "set3", "set4" and "set5". Specify which set you want in the assemble() method. Alternatively, specify the string "any", and RoboHash will pick an image set for you, based on the provided hash.

License

The Python Code is available under the MIT/Expat license. See the LICENSE.txt file for the full text of this license. Copyright (c) 2011, Colin Davis.

The RoboHash images are available under license-

The "set1" artwork was created by Zikri Kader. They are available under CC-BY-3.0 or CC-BY-4.0 license.

The "set2" artwork was created by Hrvoje Novakovic. They are available under CC-BY-3.0 license.

The "set3" artwork was created by Julian Peter Arias. They are available under CC-BY-3.0 license.

The Cats/"set4" were created by David Revoy, used under CC-BY-4.0 https://www.peppercarrot.com/en/article391/cat-avatar-generator

The avatars used in "set5" were created by Pablo Stanley, for https://avataaars.com/ They are "Free for personal and commercial use. 😇"

Disclaimer

OK, I'll admit I'm a crappy programmer. Compounding this, I wrote this code initially to be internal-only. It's ugly, and could be a LOT nicer.

Sorry about that.

You can’t perform that action at this time.