https://github.com/wooster0/morse
A library to encode, decode and play morse code
https://github.com/wooster0/morse
crystal decoder encoder library morse morse-code morse-translator morsecode
Last synced: 8 months ago
JSON representation
A library to encode, decode and play morse code
- Host: GitHub
- URL: https://github.com/wooster0/morse
- Owner: wooster0
- License: mit
- Created: 2018-04-30T10:17:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-17T14:08:28.000Z (almost 7 years ago)
- Last Synced: 2025-02-13T01:28:17.813Z (8 months ago)
- Topics: crystal, decoder, encoder, library, morse, morse-code, morse-translator, morsecode
- Language: Crystal
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# morse
A library to encode, decode and play morse code
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
morse:
github: r00ster91/morse
```2. Run `shards install`
## Usage
```crystal
require "morse"# Encode text to morse code:
morse_code = Morse.encode("hello") # => ".... . .-.. .-.. ---"# Decode morse code to text:
Morse.decode(morse_code) # => "HELLO"# Or play morse code: (this will play sounds)
Morse.play(morse_code)
```## Contributing
1. Fork it (https://github.com/r00ster91/morse/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
- [r00ster](https://github.com/r00ster91) - creator and maintainer