simple-spinner/README.md
Aşkın Gedik b31b23d45f charset
2015-12-30 16:21:42 +02:00

63 lines
1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Spinner
Terminal Spinner for Crystal Programming Language
![All](/images/all.gif)
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
spinner:
github: askn/spinner
```
## Usage
```crystal
require "spinner"
sp = Spin.new
sp.start
sleep 3
sp.stop
```
## Options
`delay`: `default = 0.1`
`chars`: you can choose charset from [CHARSET](src/spinner/charset.cr) `default = Spinner::Charset[:pipe]`
## Examples
```crystal
require "spinner"
require "colorize"
chars = Spinner::Charset[:arrow].map do |c|
c.colorize(:light_green)
end
spin = Spin.new(0.2, chars)
spin.start
sleep 3
spin.stop
```
![Color](/images/color.gif)
## Contributing
1. Fork it ( https://github.com/askn/spinner/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [askn](https://github.com/askn) Aşkın Gedik - creator, maintainer