An open API service indexing awesome lists of open source software.

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

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