https://github.com/babilonczyk/elixir-identicon
An app that takes string as an input and generates GitHub-like image
https://github.com/babilonczyk/elixir-identicon
elixir
Last synced: 4 months ago
JSON representation
An app that takes string as an input and generates GitHub-like image
- Host: GitHub
- URL: https://github.com/babilonczyk/elixir-identicon
- Owner: babilonczyk
- Created: 2023-06-15T15:10:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-16T12:23:51.000Z (over 2 years ago)
- Last Synced: 2023-08-26T20:48:00.875Z (over 2 years ago)
- Topics: elixir
- Language: Elixir
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elixir Identicon
### How to Run?
Clone repository, then:
```elixir
cd elixir_identicon
mix deps.get
iex -S mix
iex> ElixirIdenticon.generate("babilonczyk")
:ok
# Check your images directory :)
```
The goal of this project is to create a simple application that will generate the Github-like logo images, based on the string input. They should be "replicable", meaning once the same input was passed, the same identicon will be generated.
```mermaid
graph LR;
Generation[Identicon Generation]
String-->Generation;
Generation-->Image;
```
If String1 = String2, we receive the same image
```mermaid
graph LR;
String1-->Image;
String2-->Image;
```
Pipeline:
```mermaid
graph TB;
Step1[String]
Step2[Compute hash of string]
Step3[List of numbers based of the string]
Step4[Pick color]
Step5[Build grid of squares]
Step6[Convert grid to image]
Step7[Save Image]
Step1-->Step2;
Step2-->Step3;
Step3-->Step4;
Step4-->Step5;
Step5-->Step6;
Step6-->Step7;
```