Easily translate text into Morse code
Project description
MorseCodePy v1.0.4
Introduction
MorseCodePy is a module that simplifies the process of translating normal text into Morse code. This versatile module supports various languages, including English, Russian, Spanish, numbers, symbols and other.
Installation
Installing module using pip:
pip install MorseCodePy
or pip3 install MorseCodePy
How to use
encode(string, dit, dash)
returns string with translated into Morse code. string
is your text, that you want to translate. Also, you can customise dit
and dash
.
chart(dit, dash)
writes entire dictionary of letters and their Morse codes.
codes
is a dictionary with letters, numbers & symbols and their Morse code translations. Warning: translations use 1's and 0's.
Code examples:
import MorseCodePy as mc
string = "SOS"
encode_string = mc.encode(string)
print(encoded_string)
# Output: ··· --- ···
import MorseCodePy as mcp
string = "Bye!"
print(mcp.encode(string, dit='0', dash='1'))
# Output: 1000 1011 0 101011
from MorseCodePy import codes
print(codes['a'])
# Output: 01
import MorseCodePy as mc
mc.chart()
# Output: a: ·- b: ---· ...
Contact
-
Discord: CrazyFlyKite
-
Email: karpenkoartem2846@gmail.com
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
File details
Details for the file MorseCodePy-1.0.4.tar.gz
.
File metadata
- Download URL: MorseCodePy-1.0.4.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bbfbcfdde74b75239396d970ecbc7aa45b1ee3c5504ec2b69b2ed7b8c3c9edd |
|
MD5 | 9a0328d25be873a1f9bfe5e8bfea5f9f |
|
BLAKE2b-256 | d2b7d589a5b42d55a62b1d72f5d148eb77892ab928e1eea23f629cf3b8c4f388 |