mirror of
https://codeberg.org/Codeberg/avatars.git
synced 2023-08-10 21:12:50 +03:00
Update Docs
This commit is contained in:
parent
fd3ef77fa6
commit
425849f4f8
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
avatars
|
||||||
|
.idea
|
14
README.md
14
README.md
@ -1,12 +1,18 @@
|
|||||||
# Golang port of DiceBear Avatars, which in turn were inspired by 8biticon avatars
|
# 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
|
```shell
|
||||||
# will build the binary into ${BUILDDIR}. The golang compiler is fetched and installed into $PWD/gitea/bin/
|
# will build the binary
|
||||||
make BUILDDIR=$PWD
|
go build -o avatars example/main.go
|
||||||
# Create a random avatar and write it to /tmp/avatar.svg
|
# 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
|
# Open SVG file with default image viewer
|
||||||
xdg-open /tmp/avatar.svg
|
xdg-open /tmp/avatar.svg
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user