Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/askn/spinner
Terminal Spinner for Crystal Programming Language
https://github.com/askn/spinner
crystal spinner
Last synced: 8 days ago
JSON representation
Terminal Spinner for Crystal Programming Language
- Host: GitHub
- URL: https://github.com/askn/spinner
- Owner: askn
- License: mit
- Created: 2015-12-30T11:00:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T04:20:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-26T23:55:20.494Z (about 2 months ago)
- Topics: crystal, spinner
- Language: Crystal
- Homepage:
- Size: 68.4 KB
- Stars: 55
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - spinner - Terminal Spinner (Cli Utils)
README
# 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)
endspin = 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