The code behind the translator portion of this webpage was originally conceived as a Command-Line-Interface program early in my coding learning journey. I felt the code would be more useful as a webpage, and after some research settled on a simple static webpage using PyScript to run the Python code.
After forking and cloning this repository, you may access a locally-hosted version of the site by running terminal command python3 -m http.server --bind 127.0.0.1 9000
in the project's root directory (~/pyscript-MorseTranslator
). Navigate in your browser to 127.0.0.1:9000
to access the page.
Near the top of the webpage there is a large text-entry box that allows entry of english letters (for English-to-Morse), or hyphens and periods (for Morse-to-English).
Please Note: The input only accepts hyphens (-
) as dashes, and periods (.
) as dots at this time.
Please Note: spaces, as well as Morse Code for numbers and punctuation are allowed.
- Type or copy-paste the string of morse code or English you wish to convert to English into the aforementioned text-entry box.
...Letters-to-Morse
button will translate English characters into Morse Code....Morse-to-Letters
button will translate Morse Code into English characters.- A space should be inserted between each Morse "letter", else the translation will be inaccurate. Example:
-- --- .-. ... .
- A space should be inserted between each Morse "letter", else the translation will be inaccurate. Example:
- The resulting translation will appear under the
Result ↴
test.- A
[space]
designator is used between words when translating from English to Morse. Including this in back-translating (Morse to English) is OK.
- A
- If you should need to delete the text in the text-entry box, you may use the
Clear Text
button found immediately underneath the text-entry box.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.