Generate pseudo random icon from nickname
Wilfried OLLIVIER 6f70f80488 First commit 1 year ago
config First commit 1 year ago
lib First commit 1 year ago
test First commit 1 year ago
.gitignore First commit 1 year ago
README.md First commit 1 year ago
mix.exs First commit 1 year ago
mix.lock First commit 1 year ago

README.md

Identicon

Identicon is an Elixir library used to generate Identicon images. Identicons are pseudo-random gererated images based on you name using the following steps :

  • Get user input
  • Compute MD5 hash of user input
  • Get color (3 first elements of MD5 hash)
  • Build symetric a grid (from MD5 hash)
  • Assign color to non odd elements in the grid
  • Generate image

Installation

Ensure you have Erlang, BEAM and Elixir.

$ mix deps.get, compile

Usage

$ iex -S mix
iex> Identicon.main("rick", "/tmp")

Then, open rick.png inside /tmp dir

Documentation

Documentation can be generated with ExDoc

$ mix docs
$ $BROWSER docs/index.html

Licence

    DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

    Copyright 2017 papey

    Everyone is permitted to copy and distribute verbatim or modified
    copies of this license document, and changing it is allowed as long
    as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

     0. You just DO WHAT THE FUCK YOU WANT TO.

TODO

  • Create a binary using escript !