Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/mailsg/morse-code
- Owner: mailsg
- License: mit
- Created: 2023-07-26T13:09:38.000Z (over 1 year ago)
- Default Branch: development
- Last Pushed: 2023-07-26T15:53:52.000Z (over 1 year ago)
- Last Synced: 2024-12-08T14:41:22.392Z (2 months ago)
- Language: Ruby
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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** 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".Ruby
Ruby
- Decodes a morse character a word and a sentence
- Returns the decoded message in uppercase
- Returns the decoded message with spaces between words and charactersTo 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"👤 **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/)- Add support for numbers and punctuation marks
- Add support for international characters
- Add support for prosignsContributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/mailsg/Morse-Code/issues).
If you like this project, please give it a star. Contact me on LinkedIn. It will be a pleasure to hear from you.
I would like to thank Microverse (microverse.org) for providing the resources and the knowledge to work on projects like this.
- **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/
This project is [MIT](https://github.com/mailsg/Morse-Code/blob/morse-code/LICENSE) licensed.