Skip to content

richardtifelt/Robohash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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", "w") as f:
    rh.img.save(f, format="png")

Robosets

RoboHash comes with three image sets, named "set1", "set2", and "set3". 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.

The "set1" artwork was created by Zikri Kader. The "set2" artwork was created by Hrvoje Novakovic. The "set3" artwork was created by Julian Peter Arias.

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 the CC-BY-3.0 license.

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.

Packages

No packages published

Languages

  • JavaScript 34.8%
  • CSS 24.2%
  • Python 22.5%
  • HTML 18.3%
  • Shell 0.2%