Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdwagner/screen.cr
Crystal port of screen package (Go) to provide a cross-platform way for clearing the screen.
https://github.com/mdwagner/screen.cr
crystal crystal-lang linux macos windows
Last synced: 17 days ago
JSON representation
Crystal port of screen package (Go) to provide a cross-platform way for clearing the screen.
- Host: GitHub
- URL: https://github.com/mdwagner/screen.cr
- Owner: mdwagner
- License: mit
- Created: 2023-03-24T13:25:28.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-01T02:59:30.000Z (over 1 year ago)
- Last Synced: 2024-10-25T01:24:02.722Z (2 months ago)
- Topics: crystal, crystal-lang, linux, macos, windows
- Language: Crystal
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# screen
Crystal port of [screen](https://github.com/inancgumus/screen) package (Go), to provide an easy way to clear the screen or move the cursor in cross-platform way (Linux, Mac OS, Windows).
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
screen:
github: mdwagner/screen.cr
version: "~> 0.2.0"
```2. Run `shards install`
## Usage
```crystal
require "screen"Screen.clear # Clear all the characters on the screen
Screen.move_top_left # Moves the cursor to the top-left position of the screen
Screen.cls # Performs both methods above (typical `cls` or `clear` terminal behavior)
```## Contributing
1. Fork it ()
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
- [Michael Wagner](https://github.com/mdwagner)