From 425849f4f845e57da8d1d4af9fc55c8c5f3640b0 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 2 Feb 2021 02:43:59 +0100 Subject: [PATCH] Update Docs --- .gitignore | 2 ++ README.md | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .gitignore 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 ```