{"id":16944931,"url":"https://github.com/drbrain/go-unicornify","last_synced_at":"2025-06-22T01:41:35.719Z","repository":{"id":66234682,"uuid":"306454419","full_name":"drbrain/go-unicornify","owner":"drbrain","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-22T21:14:05.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-04-10T07:31:44.347Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drbrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-22T20:43:34.000Z","updated_at":"2024-06-19T13:18:45.003Z","dependencies_parsed_at":"2023-02-24T01:01:18.824Z","dependency_job_id":null,"html_url":"https://github.com/drbrain/go-unicornify","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Fgo-unicornify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Fgo-unicornify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Fgo-unicornify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drbrain%2Fgo-unicornify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drbrain","download_url":"https://codeload.github.com/drbrain/go-unicornify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244759961,"owners_count":20505716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:19:25.058Z","updated_at":"2025-03-21T08:15:34.701Z","avatar_url":"https://github.com/drbrain.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThis is a command line tool that generates the same unicorn avatar images as the [Unicornify web service](https://unicornify.pictures), just in better quality. For instance, the unicorn avatar for the email address mail@example.com, when generated by the website, looks like this:\n\n![](https://unicornify.pictures/avatar/7daf6c79d4802916d83f6266e24850af?s=128)\n\nThe website returns JPEGs with a maximum size of 128x128 pixels. This tool gives you any size you want, and it gives you a PNG image:\n\n![](https://i.imgur.com/NvySwQb.png)\n\nIt also has a few nice extra options.\n\n# Installation\n\nThere's not much to install. You can either download one of these binaries:\n\n- ~[Download for Linux](https://bitbucket.org/balpha/go-unicornify/downloads/go-unicornify)~\n- ~[Download for Windows](https://bitbucket.org/balpha/go-unicornify/downloads/go-unicornify.exe)~\n\nfrom the ~[Downloads](https://bitbucket.org/balpha/go-unicornify/downloads)~ page (it's a single executable file, called `go-unicornify` on Linux  and `go-unicornify.exe` on Windows), or you can compile the program yourself (it is written in Go, a.k.a. golang).\n\nPlease refer to the [LICENSE.txt](/drbrain/go-unicornify/blob/main/LICENSE.txt) file for redistribution information.\n\n# Usage\n\n##Specifying the unicorn\n\nUnicorns are always generated based on a single (hexadecimal) number. Usually, this number is generated from an email address (by taking the MD5 hash, [just like Gravatar](https://en.gravatar.com/site/implement/hash/)). For example, the number corresponding to the address mail@example.com is 7daf6c79d4802916d83f6266e24850af.\n\nYou have three options how to tell the program which Unicorn to render: With the `-m`, `-h`, and `-r` options.\n\n    ./go-unicornify -m mail@example.com\n    ./go-unicornify -h 7daf6c79d4802916d83f6266e24850af\n    ./go-unicornify -r\n\nWith `-m` you pass the email address you want to generate the avatar for, and the program will generate the hash number.\n\nWith `-h`, you pass the number directly. Although both `-m` and `-r` always generate 32-digit numbers, this is not a requirement. You can pass hex numbers of any length to `-h`.\n\nFinally with `-r`, you tell program to generate a random number, and thus a random unicorn.\n\nYou must specify one (exactly one) of the above three. All the other following settings are optional.\n\n## Output file\n\nBy default, Go-Unicornify will save the unicorn image to a file called `{hexnumber}.png`, where {hexnumber} is the number the unicorn is generated from. To specify a different file name, use the `-o` switch:\n\n    ./go-unicornify -r -o awesome-unicorn.png\n\n## Image size\n\nGo-Unicornify always generates square images. You can specify the width (and thus height) you want with the `-s` switch:\n\n    ./go-unicornify -m mail@example.com -s 1024\n\nwill generate a 1024x1024 pixel image.\n\n## Shading \u0026 grass\n\nBy default, Go-Unicornify generates the \"classic\" style images that look fairly flat. With the `-shading` and `-grass` parameters, the pictures get much more depth. Compare:\n\n![](https://i.imgur.com/sa9pfwu.png) ![](https://i.imgur.com/KpQvoZ4.png)\n\nThose two images were generated with these commands:\n\n    ./go-unicornify -h b50eb7b293596008ecbb108815f82d31 -s 400\n    ./go-unicornify -h b50eb7b293596008ecbb108815f82d31 -s 400 -shading -grass\n\n## Transparent background\n\nUnicorns want to be free! To render generate the unicorn without the background, e.g. for inserting it into another images, use the `-f` switch.\n\n    ./go-unicornify -m mail@example.com -shading -f\n\n## Zoom out\n\nOn some avatars, the unicorn is fully visible, on others, only the head may be shown. If your unicorn is not fully visible, but you need it in full (to print it on a T-Shirt maybe?), you can use the `-z` switch.\n\n    ./go-unicornify -m mail@example.com -z\n\nYou'll usually want to combine this with `-f`.\n\nThe following images show the effects of the `-f` and `-z` switches:\n\n![](https://i.imgur.com/n7RgpHB.png) ![](https://i.imgur.com/vMfnCCl.png) ![](https://i.imgur.com/Ns0QX6Y.png)\n\nThe three pictures were generated, in order, with the following commands:\n\n    ./go-unicornify -o example.png -h 772b4415cd38c3af6b522087a6359194 -s 200 -shading -grass\n    ./go-unicornify -o example.png -h 772b4415cd38c3af6b522087a6359194 -s 200 -shading -f\n    ./go-unicornify -o example.png -h 772b4415cd38c3af6b522087a6359194 -s 200 -shading -f -z\n\n## Disable anti-aliasing\n\nThe drawing algorithm produces very [aliased](http://en.wikipedia.org/wiki/Aliasing) images. In order to create smoother lines, the program behind the scenes creates an image that's twice as wide and twice as high as the requested size, and then uses bilinear interpolation to downscale the image. If, for whatever reason, you want to disable this anti-aliasing, you can use the `-noaa` switch.\n\nThis picture shows a detail of the above image, magnified four-fold:\n\n![](https://i.imgur.com/z2cos5b.png)\n\nThe left image was generated normally, the right image with disabled anti-aliasing.\n\n## Disable parallelization\n\nThe drawing operation is parallelized by default to make use of multiple processor cores. You can disable this with the `-serial` switch.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbrain%2Fgo-unicornify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrbrain%2Fgo-unicornify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrbrain%2Fgo-unicornify/lists"}