Skip to content

Extends the traditional morse code to include attention to case sensitivity and encode/decode a human readable nice text

License

Notifications You must be signed in to change notification settings

danysrour/morsecode_enhanced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MorseCodeEnhanced

MorseCodePlus is a Python package that provides functionality for encoding and decoding Morse code.

Installation

You can install MorseCodePlus using pip:

pip install morsecode_enhanced

Usage

Encoding

To encode text into Morse code, you can use the encode function:

from morsecode_enhanced import MorseCode

mc = MorseCode()
encoded_word = mc.encode_word('Hello, World!')
print(encodex_word)

Output:

.... . .-.. .-.. --- --..-- / .-- --- .-. .-.. -.. -.-.--

Decoding

To decode Morse code into text, you can use the decode function:

from morsecode_enhanced import MorseCode

mc = MorseCode()
decoded_message = mc.decode('.... . .-.. .-.. --- --..-- / .-- --- .-. .-.. -.. -.-.--')
print(decoded_message)

Output:

HELLO, WORLD!

More Functionalities

from morsecode_enhanced import MorseCode

mc = MorseCode()
encoded_word = mc.encode_word('Hello')
print(encoded_word)

decoded_word = mc.decode_word('.-..')
print(decoded_word)

random_morse = mc.generate_random_morse(10)

is_valid_morse = mc.is_valid_morse_code(encoded_word)

analyzed = mc.analyze_frequency('.-..')

visualised = mc.visualize_morse_code('.-..')

duration = mc.calculate_duration('.-..')

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License


You can now copy this code and use it as your README.md file.

About

Extends the traditional morse code to include attention to case sensitivity and encode/decode a human readable nice text

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages