diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..28a6b03 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +avatars +.idea diff --git a/README.md b/README.md index 74b8ad1..a7ac091 100644 --- a/README.md +++ b/README.md @@ -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 ```