Python package for converting text to Morse code and vice versa
Project description
Morse Package
Python package for converting text to Morse code and vice versa.
Installation
You can install the morse-package
from PyPI using pip:
pip install morse-package
Usage
Converting Text to Morse Code
from morse.Morse import Morse
m = Morse()
text = "Hello, World!"
morse_code = m.to_morse(text)
print(f"Text '{text}' in Morse code: {morse_code}")
Converting Morse code to Text
from morse import Morse
m = Morse()
morse_code = ".... . .-.. .-.. --- --..-- / .-- --- .-. .-.. -.. -.-.--"
text = m.to_string(morse_code)
print(f"Morse code '{morse_code}' decoded to text: {text}")
Getting Morse code dictionary
from morse import Morse
m = Morse()
codes_dict = m.get_morse_codes()
print("Morse code dictionary:")
for key, value in codes_dict.items():
print(f"{key}: {value}")
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Feel free to open issues or pull requests on the GitHub repository.
Support
For support or questions, please contact Rahul Parihar
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file morsecode_package-1.0.0.tar.gz
.
File metadata
- Download URL: morsecode_package-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6653a4f3464a15032fff567ec5a43a7f68e6770d797894a00acde190420e3b5 |
|
MD5 | d9f66aeb39f31f95ffc2b166eb688a31 |
|
BLAKE2b-256 | 2619a30b798c6a3a993d9a0c3fb5489652cea83c035cd162367f2a57bc5d342d |
File details
Details for the file morsecode_package-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: morsecode_package-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 930a6d6003462eb7838b72630c4943f3b2b890794ba1c7e27d984bc0b860899e |
|
MD5 | 98b76b802d8ad82be5454f87a76592ee |
|
BLAKE2b-256 | 4cecb7f72361e1cf6ad355291da689c5c79dfa3deb3765b6c62948bd3c8dad47 |