Skip to content

RainyCityCoder/pyscript-MorseTranslator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PyScript-based Morse Code / English Translator

Description

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.

Forking

Instructions:

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.

User Interaction:

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.

  1. Type or copy-paste the string of morse code or English you wish to convert to English into the aforementioned text-entry box.
    1. ...Letters-to-Morse button will translate English characters into Morse Code.
    2. ...Morse-to-Letters button will translate Morse Code into English characters.
      1. A space should be inserted between each Morse "letter", else the translation will be inaccurate. Example: -- --- .-. ... .
  2. The resulting translation will appear under the Result ↴ test.
    1. A [space] designator is used between words when translating from English to Morse. Including this in back-translating (Morse to English) is OK.
  3. 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.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

Originally conceived as a Python CLI program, ported to a static webpage that can translate Morse Code to English, and visa-versa.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published