3个版本 (破坏性)
| 0.3.0 | 2019年5月30日 | 
|---|---|
| 0.2.0 | 2017年7月11日 | 
| 0.1.0 | 2017年3月24日 | 
#6 in #identicon
每月下载量 82次
11KB
194 行
blockies.rs
生成方块标识符的库
Rust实现的javascript blockies 库。也支持 以太坊blockies
库使用
use blockies::Ethereum;
let blockies = Ethereum::default();
let mut png = Vec::new();
blockies.create_icon(&mut png, b"0x01122df2b7d1c0a6ad94589da045af3885bedbbc");
// `png` now contains a rendered image of the blockies for that address
assert_eq!(png.len(), 179);
CLI使用
使用以下命令构建
cargo build --release -p blockies-cli
blockies 0.1.1
debris <marek.kotewicz@gmail.com>
blockies cli
USAGE:
    blockies [OPTIONS] --seed <seed>
FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
OPTIONS:
        --mode <mode>        Choose blockies image type
        --output <output>    Output file path
        --scale <scale>      Blockies pixel size
        --seed <seed>        Seed phrase for generating new image
        --size <size>        Blockies image size
TODO
- 通过CLI指定颜色
依赖关系
~775KB
~15K SLoC