Skip to content

Commit

Permalink
docs: creating README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JansenBr authored Mar 30, 2024
1 parent bf6ce3f commit 94945f7
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# `morse_coder` is a CLI to encode text-to-morse and decode morse-to-text
## It has built in morse code audio generation for CW trainning

There are hunderts of solutions that do the same available in different languages, check them out to see the one that suits your needs the most, here are just a few:
- [ggmorse](https://github.com/ggerganov/ggmorse) (C++)
- [morse-talk](https://github.com/morse-talk/morse-talk) (python)
- [morse](https://github.com/alwindoss/morse) (goLang)
#

## Install

Since it uses `sounddevice` it will require `libportaudio2`

```
sudo apt install libportaudio2
```

## Usage

**Encoding Text to Morse Code:**

To translate a text message into Morse code, use the following command:

```
morse_coder translate <text_message>
```

* Replace `<text_message>` with the text you want to encode.

**Decoding Morse Code to Text:**

To decode a Morse code message back into text, use the same command structure:

```
morse_coder translate <morse_message>
```

* Replace `<morse_message>` with the Morse code sequence you want to decode.

**Important Note:**

* Morse code messages must be formatted with **three spaces between letters** and **seven spaces between words**.

**Playing Morse Code Sound:**

To play the Morse code sound of a text message, use the `--play` flag:

```
morse_coder translate --play <text_message>
```

**Important Note:**

* The `--play` flag **only works with text messages** as input. It cannot play decoded Morse code output.

**Examples:**

* Encode "Hello world" to Morse code:

```
morse_coder translate "Hello world"
```

* Decode ".... . .-.. .-.. ---" to text:

```
morse_coder translate ".... . .-.. .-.. ---"
```

* Encode "SOS" and play the Morse code sound:

```
morse_coder translate --play "SOS"
```



# Contributing
We welcome contributions from the community to enhance the functionality and usability of this repository. Feel free to submit issues, feature requests, or pull requests to help improve this repo!

0 comments on commit 94945f7

Please sign in to comment.