Update Docs

This commit is contained in:
6543 2021-02-02 02:43:59 +01:00
parent fd3ef77fa6
commit 425849f4f8
No known key found for this signature in database
GPG Key ID: C99B82E40B027BAE
2 changed files with 12 additions and 4 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
avatars
.idea

View File

@ -1,12 +1,18 @@
# Golang port of DiceBear Avatars, which in turn were inspired by 8biticon avatars
## Build & Run
## Usage
import `codeberg.org/Codeberg/avatars`
and use `string svg = avatars.MakeAvatar(seed)`
## Build & Use Example
```shell
# will build the binary into ${BUILDDIR}. The golang compiler is fetched and installed into $PWD/gitea/bin/
make BUILDDIR=$PWD
# will build the binary
go build -o avatars example/main.go
# Create a random avatar and write it to /tmp/avatar.svg
$PWD/gitea/bin/avatar my-special-seed-string > /tmp/avatar.svg
./avatars my-special-seed-string > /tmp/avatar.svg
# Open SVG file with default image viewer
xdg-open /tmp/avatar.svg
```