Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mailsg/morse-code

Morse Code Decoder is built with Ruby. It is a tool that allows users to convert a Morse code into human readable text. It takes a string of Morse code as an input. Morse code is a system of communication that uses a series of dots and dashes to represent letters, numbers, and symbols.
https://github.com/mailsg/morse-code

Last synced: 7 days ago
JSON representation

Morse Code Decoder is built with Ruby. It is a tool that allows users to convert a Morse code into human readable text. It takes a string of Morse code as an input. Morse code is a system of communication that uses a series of dots and dashes to represent letters, numbers, and symbols.

Awesome Lists containing this project

README

        

# 📗 Table of Contents

- [📖 About the Project](#about-project)
- [🛠 Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [💻 Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [👥 Authors](#authors)
- [🔭 Future Features](#future-features)
- [🤝 Contributing](#contributing)
- [⭐️ Show your support](#support)
- [🙏 Acknowledgements](#acknowledgements)
- [❓ FAQ](#faq)
- [📝 License](#license)

# 📖 [Morse Code Decoder]

**Morse Code Decoder** aims to decode messages written in Morse code. With the help of Ruby, we will create methods to decipher individual characters, entire words, and even the entire message hidden in those old bottles. The resulting strings will be presented in uppercase, making it easier to read the messages.

## Project Requirements

To successfully decode the Morse code messages, we will implement the following methods:

### 1. `decode_char`

- This method takes a Morse code character as a string parameter.
- It returns the corresponding uppercase alphabetic character.
- Example: `decode_char(".-")` returns "A".

### 2. `decode_word`

- This method takes a Morse code word as a string parameter.
- It returns the string representation of the word, with each character separated by a single space.
- Example: `decode_word("-- -.--")` returns "MY".

### 3. `decode`

- This method takes a Morse code message as a string parameter.
- It returns the string representation of the entire message, with each word separated by three spaces.
- Example: `decode("-- -.-- -. .- -- .")` returns "MY NAME".

## 🛠 Built With

Ruby

### Tech Stack

Ruby

### Key Features

- Decodes a morse character a word and a sentence
- Returns the decoded message in uppercase
- Returns the decoded message with spaces between words and characters

(back to top)

## 💻 Getting Started

To get started with decoding Morse code messages, follow these steps:

### Prerequisites

Ensure you have the following installed:

- Ruby programming language
- IRB (Interactive Ruby)

### Setup

1. Clone this repository to your local machine:
`git clone https://github.com/mailsg/Morse-Code.git`

2. Open your terminal and navigate to the project directory:
`cd Morse-Code`
and install dependencies by running
`bundle install`

3. Run IRB to access the Ruby interactive console:
`irb`

4. To run the project, execute the following command
`irb`
`decode_char(".-")`
`decode_word("-- -.--")`
`decode("-- -.-- -. .- -- .")`
`decode(".- -... --- -..- ..-. ..- .-.. .-.. --- ..-. .-. ..- -... .. . ...")`

5. Now you can use the provided methods to decode Morse code messages. For example:
decode_char(".-")
# Output: "A"

decode_word("-- -.--")
# Output: "MY"

decode("-- -.-- -. .- -- .")
# Output: "MY NAME"

(back to top)

## 👥 Authors

👤 **Sandeep Ghosh**

- GitHub: [@mailsg](https://github.com/mailsg)
- LinkedIn: [Sandeep Ghosh](https://www.linkedin.com/in/sandeep0912/)

👤 **Phelelani Ndlovu**
- GitHub: [@techmoves](https://github.com/techmoves)
- LinkedIn: [Phelelani Ndlovu](https://www.linkedin.com/in/phelelani-ndlovu/)

(back to top)

## 🔭 Future Features

- Add support for numbers and punctuation marks
- Add support for international characters
- Add support for prosigns

(back to top)

## 🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/mailsg/Morse-Code/issues).

(back to top)

## ⭐️ Show your support

If you like this project, please give it a star. Contact me on LinkedIn. It will be a pleasure to hear from you.

(back to top)

## 🙏 Acknowledgments

I would like to thank Microverse (microverse.org) for providing the resources and the knowledge to work on projects like this.

(back to top)

## ❓ FAQ

- **How do I install Ruby?**

You can download the latest version of Ruby from the official website: https://www.ruby-lang.org/en/downloads/

-**Where can I learn the basics of Ruby?**

Check out the Ruby documentation and tutorials at https://www.ruby-lang.org/en/documentation/ and https://www.ruby-lang.org/en/documentation/quickstart/

(back to top)

## 📝 License

This project is [MIT](https://github.com/mailsg/Morse-Code/blob/morse-code/LICENSE) licensed.

(back to top)