# rune-morse
> Morse code encoder and decoder — ASCII text to dots and dashes and back.
[](https://crates.io/crates/rune-morse)
[](https://docs.rs/rune-morse)
[](LICENSE)
[](https://github.com/alexile/runes/actions)
## What it does
Converts between ASCII text and International Morse Code. Letters are separated by
a single space; words are separated by ` / `. Both uppercase and lowercase input are
accepted during encoding. Useful for CTF challenges, amateur radio utilities, and
educational tools.
## Installation
```toml
[dependencies]
rune-morse = "0.1"
```
## Usage
### Library
```rust
use rune_morse::{encode, decode};
let morse = encode("SOS").unwrap();
assert_eq!(morse, "... --- ...");
let text = decode("... --- ...").unwrap();
assert_eq!(text, "SOS");
```
### CLI
```bash
cargo install rune-morse
```
## CLI
```bash
# Encode text to Morse code
rune-morse encode "Hello World"
# .... . .-.. .-.. --- / .-- --- .-. .-.. -..
# Decode Morse code to text
rune-morse decode ".... . .-.. .-.. --- / .-- --- .-. .-.. -.."
# HELLO WORLD
```
## Output
```
$ rune-morse encode "SOS"
... --- ...
$ rune-morse decode "... --- ..."
SOS
```
## License
MIT