This identicon was generated using the SHA512 hash of the main.go file of this program. 🐱 this
• • •
Cross-platform CLI program to generate identicons based on some string passed as arguement and save as a PNG image and as a SVG vector image.
identicon --config=./assets/example-config.json --save=./assets/example-image.png poseidon
The config file in this usage example is example-config.json. The generated image using that config file is example-image.png
GENERAL FLAGS | USAGE | EXAMPLE |
---|---|---|
-h , --help |
list available options | identicon -h |
--config path |
path to any supported config.json file | identicon --config=./example-config.json <text> |
--save path |
saves image to the specified directory | identicon --save=./example-image.png <text> |
--hash |
allows passing hash directly (instead of text) | identicon --hash <hash> |
--save : If file name is passed with a PNG extension (filename.png), then only a PNG image will be saved. If file name is passed with a SVG extension (filename.svg), then only a SVG file will be saved. If neither PNG nor SVG file name is passed then both the SVG & PNG images will be saved.
IDENTICON FLAGS | USAGE | EXAMPLE |
---|---|---|
--size number |
sets size of the identicon (range: 4-8) (default 6) | identicon --size=8 <text> |
--border |
adds a border to the identicon | identicon --border <text> |
--square |
creates a square identicon | identicon --square <text> |
--invert |
inverts the cell filling of identicon | identicon --invert <text> |
--vertical |
creates identicon in portrait dimension (not visible on using --square flag) |
identicon --vertical <text> |
--symmetric |
creates symmetric identicon | identicon --symmetric <text> |
IMAGE FLAGS | USAGE | EXAMPLE (compulsory to use --save flag with any Image Flags) |
---|---|---|
--image-size character |
saves image with given resolution preset (S,M,L,X) (default "L") | identicon --image-size=M --save=./example-image.png <text> |
--image-portrait |
saves image with portrait dimensions | identicon --image-portrait --save=./example-image.png <text> |
--fg 6-digit HEX-string |
sets image's foreground color (default "6dff24") | identicon --fg=a4f3dd --save=./example-image.png <text> |
--bg 6-digit HEX-string |
sets image's background color (default "0b2100") | identicon --bg=04a034 --save=./example-image.png <text> |
(if using Unix-like operating systems, chances are, all the above prerequisites were already met, except may be Go
- can be installed using OS's package manager)
(other operating systems should consult uncle Google for such requirements, or can just build from source code - check Building)
- Clone/Download this repository
- Go into the cloned/downloaded repository
- Use
sudo make install
command to install it globally (if you are using any OS other than Linux you may not havesudo
&make
programs, forsudo
consult your OS's guide to raising user priveleges, and formake
you will need to install it from here, specific to your OS) - After installing, you can delete the cloned/downloaded folder
Level: 1000 ? Copy-Paste this ↓ (assuming you are in a Linux/Unix-like OS, if you are on any other OS then follow the above steps relative to your OS)
git clone https://github.com/poseidon-code/identicon
cd ./identicon
sudo make install
cd ..
rm -rf ./identicon
- Go into the cloned/downloaded repository
- Use
sudo make uninstall
command to uninstall it globally. It will literally remove the binary from/usr/bin/identicon
. (if you are using any OS other than Linux you may not havesudo
&make
programs, forsudo
consult your OS's guide to raising user priveleges, and formake
you will need to install it from here, specific to your OS) - After uninstalling, you can delete the cloned/downloaded folder
cd ./identicon
sudo make uninstall
cd ..
rm -rf ./identicon
Pre-compiled 64-bit architecture binaries are available for Windows, Linux & macOS operating systems. Check out the Github Releases page for downloading your OS specific binary.
Building a Go program is the easiest of all. All you need is Go
installed in your system (Download & Install Go). To build a binary for your operating system & architecture, follow these steps :
- Clone/Download this repository
- Go into the cloned/downloaded repository
- Use
go build github.com/poseidon-code/identicon
command to build your own binary - Copy/Move the generated
identicon
binary to where ever you wish to access it from (most prefferably, some directory which is exported to global$PATH
, to access it globally - may requireroot
/administrator
privileges) - After copying over to some directory, you can always delete the cloned/downloaded repository folder
Level: 1000 ? Copy-Paste this ↓ (assuming you are in a Linux/Unix-like OS, if you are on any other OS then follow the above steps as per your OS)
git clone https://github.com/poseidon-code/identicon
cd ./identicon
go build github.com/poseidon-code/identicon
sudo cp ./identicon /usr/bin/
cd ..
rm -rf ./identicon
MIT License
Copyright (c) 2022 Pritam Halder
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.