Golang port of DiceBear Avatars
Go to file
2021-02-02 02:43:25 +01:00
go.mod init go.mod 2021-02-02 02:05:04 +01:00
main.go fix alpha bug for beards 2021-02-02 01:59:19 +01:00
Makefile address issue #2 2021-02-02 01:41:25 +01:00
mosaic.png Dateien hochladen nach „“ 2021-02-02 02:28:24 +01:00
README.md fix README 2021-02-02 02:43:25 +01:00

Golang port of DiceBear Avatars, which in turn were inspired by 8biticon avatars

Example images

Build & Run

# will build the binary into ${BUILDDIR}. The golang compiler is fetched and installed into ${BUILDDIR}
make BUILDDIR=$PWD
# Create a random avatar and write it to /tmp/avatar.svg
$PWD/gitea/bin/avatar my-special-seed-string > /tmp/avatar.svg
# Open SVG file with image viewer
eog /tmp/avatar.svg

Create mosaic with example images using rsvg and imagemagick montage

make BUILDDIR=$PWD
for i in {1..40} ; do
	$PWD/gitea/bin/avatar my-special-seed-string_$i > /tmp/avatar_$i.svg
	rsvg-convert /tmp/avatar_$i.svg -z 10 -o /tmp/avatar_$i.png
done
montage -tile 10x4 /tmp/avatar_*.png /tmp/mosaic.png
eog /tmp/mosaic.png