Convert text to Morse Code and vise-versa.
Project description
Morse Code Translator
Its converts plain text to morce code and vice versa and follows below rules for the conversion as per the morce-code algorithm,
- Single space for same char repeats
- Three spaces for different char
- Seven spaces to differentiate the word
Installation
Method 1:
To install the MorceCodeTranslator just run the command pip install -U morsecodetranslator
Method 2:
- Clone the repository
git clone https://github.com/gugupy/morsecodetranslator.git
- Run the command
pip install -e .
Sample code
from morsecodetranslator.morse import MorseCodeTranslator
mct = MorseCodeTranslator()
print(mct.encrypt('MORCE CODE'))
print(mct.decrypt('-- --- .-. -.-. . -.-. --- -.. .'))
output
-- --- .-. -.-. . -.-. --- -.. .
MORCE CODE
MIT License
Copyright (c) 2022 Gughanathan M
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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
Hashes for morse_transcript-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a161251b11ce305e179eabb07f28c266722a0d5851fae8f6631c255d25828d40 |
|
MD5 | 5127ff24f15e38c60bd1af4625c6ce7e |
|
BLAKE2b-256 | e41ec244d661f3563776bf3ab26423b9bd4f09f8887622f5aab83ef2159dfbce |