Sign inSign up

snoopy3476/eth-blockies

By snoopy3476

•Updated about 3 years ago

A pure Rust executable binary to generate Ethereum-style blockies

Image
0

1.4K

snoopy3476/eth-blockies repository overview

⁠eth-blockies

binary-example.png

A lightweight binary to get png image data or ANSI sequence string data of Ethereum-style blocky identicon, which can be used for generating blockies icon images, printing to terminal, etc.

⁠Usage

  • Note: To print ANSI sequence colors to console properly in Windows, you might need to either:
    • Enable ANSI sequence support for default Windows console, or
    • Use Windows Terminal⁠ instead of the default console.
usage: docker run --rm snoopy3476/eth-blockies <seed> [output-fmt (ansi|image)] [OPTIONS...]

<seed>                 Seed to generate blockies (e.g. Ethereum wallet address)

[output-fmt]  - ansi   (Default) Print ansi sequence of blockies to stdout,
                       usually for printing to terminal
              - image  Print png image binary data of blockies to stdout

[OPTIONS...]:

        -e --ethseed   Interpret seed string as Ethereum address,
                       and canonicalize seed (to lowercase + set '0x' prefix)
                       to get Ethereum blockies correctly
        -a --ascii     (only for 'ansi' mode)   Get non-compact, big blockies
                                                with ascii (non-unicode)
        -r --raw       (only for 'image' mode)  Get uncompressed, raw png image

        -s --size=<BLOCKIES_SIZE>
                       Blockies size: # of elems per side (1-32) (Default: '8')

        -d --dimension=<WIDTH>x<HEIGHT>
                       Dimensions of output in the form of '(width)x(height)'
                       If not given, following is used (Default):
                       - ('ansi' mode)   '(blockies_size)x(blockies_size)'
                       - ('image' mode)  '128x128'



examples:

- Outputs from following commands are all the same:
$ docker run --rm snoopy3476/eth-blockies 0xe686c14ff9c11038f2b1c9ad617f2346cfb817dc
$ docker run --rm snoopy3476/eth-blockies e686c14FF9C11038F2B1c9aD617F2346CFB817dC -e

- Outputs from following commands are all the same:
$ docker run --rm snoopy3476/eth-blockies "generic_seed_not_ethaddr" --size=15
$ docker run --rm snoopy3476/eth-blockies "generic_seed_not_ethaddr" ansi --size=15 --dimension=15x15
$ docker run --rm snoopy3476/eth-blockies "generic_seed_not_ethaddr" a -s 15 -d 15x15

- Outputs from following commands are all the same:
$ docker run --rm snoopy3476/eth-blockies "generic_seed" image > blockies.png
$ docker run --rm snoopy3476/eth-blockies "generic_seed" i -d128x128 > blockies.png

Tag summary

Content type

Image

Digest

sha256:62efaaf4f…

Size

1.2 MB

Last updated

about 3 years ago

docker pull snoopy3476/eth-blockies