https://github.com/dearblue/ruby-snowy
雪の結晶を模した identicon
https://github.com/dearblue/ruby-snowy
Last synced: about 2 months ago
JSON representation
雪の結晶を模した identicon
- Host: GitHub
- URL: https://github.com/dearblue/ruby-snowy
- Owner: dearblue
- License: bsd-2-clause
- Created: 2016-12-10T14:46:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-05T14:17:34.000Z (about 8 years ago)
- Last Synced: 2025-03-14T13:16:51.882Z (3 months ago)
- Language: Ruby
- Size: 87.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# snowy
"snowy" is an identicon implements with the snow crystal motif.
* package name: snowy
* version: 0.2
* software quality: EXPERIMENTAL
* license: BSD-2-clause License
* author: dearblue
* report issue to:
* dependency ruby: ruby-2.1+
* dependency ruby gems: (none)
* dependency library: (none)
* bundled external C library: (none)
## How to usage
``` ruby:ruby
require "snowy"
require "zlib"str = "abcdefg"
driver = :ruby # or :cairo (when installed ``cairo'' gem)
angle = 5 # by any degree number
pngdata = Snowy.generate_to_png(str, size: 256, angle: angle, driver: driver)
File.binwrite("snowy.png", pngdata)
```## Demonstration with web browser
``` shell
$ ruby snowy-demo.rb -p 4567
```And, access to http://localhost:4567/ on web browser.