Project

rubohash

0.0
Low commit activity in last 3 years
Ruby adaptation of robohash.org
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.4
~> 13.0
~> 3.12
>= 1.60, < 2.0
~> 0.9, >= 0.9.20

Runtime

~> 4.9.4
 Project Readme

Rubohash

A ruby implementation for generating unique images based on the checksum of a given string.

Installation

Add it to your Gemfile from GitHub:

gem 'rubohash', github: 'nedzib/rubohash', group: :development

For reproducible installs, prefer pinning a ref:

gem 'rubohash', github: 'nedzib/rubohash', tag: 'v0.1.0', group: :development

By default, generated files are written to ./output from your current working directory.

For local development in this repository, you can use ./bin/build.sh.

Usage

From Ruby code:

  Rubohash.assemble!("my_test_string_here")

To generate transparent PNGs without background composition:

Rubohash.configure do |config|
  config.use_background = false
end

Rubohash.assemble!("my_test_string_here")

This will run the algorithm and output the file to @robot_output_path. You also need to have ImageMagick installed on your system.

From the command line:

rubohash my_test_string_here
rubohash my_test_string_here --output ./tmp/robots --format jpg
rubohash my_test_string_here --no-background

Rubohash can also be mounted inside a Rails application by setting mounted to true.

Cleaning Up

You should be able to completely uninstall the gem by running:

  ./bin/clean.sh

License and Attribution

The gem is available as open source under the terms of the MIT License.

Derivation Notice! :

The images are licensed under Creative Commons by attribution

Robots lovingly provided by robohash.org

This ruby gem is a derivation of the python repository at: https://github.com/e1ven/Robohash

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.