A simple Morse code converter
Project description
Morse Code Converter
The Morse Code Converter is a Python package that facilitates the conversion between plain text and Morse code. It offers functionalities to encode text into Morse code and decode Morse code back into readable text. Additionally, it supports file-based conversions, allowing users to process entire files containing text or Morse code.
Team members
Link to PyPI website
Features
- Text to Morse Code Conversion: Convert any given text into its Morse code representation.
- Morse Code to Text Conversion: Decode Morse code sequences back into plain text.
- File Conversion: Process files to convert their contents between text and Morse code.
- Morse Code to Audio: Can play sound for morse code through a combination of long and short beeps.
Development set up
- Install Python (3.11+), pipenv, and Git.
- Make sure pipenv is installed
pip install pipenv - Activate the virtual environment with
pipenv shell - Install package with
pip install -e .(please include the dot after -e).
Example commands to run the package
- Example commands for text to morse:
python -m text_morse_code_converter --text "HELLO WORLD" - Example commands for morse to text:
python -m text_morse_code_converter --morse ".... . .-.. .-.. --- / .-- --- .-. .-.. -.." - Example commands for text input file to morse output file:
python -m text_morse_code_converter --input_file input.txt --output_file output.txt --file_mode text_to_morse - Example commands for morse input file to text output file:
python -m text_morse_code_converter --input_file input.txt --output_file output.txt --file_mode morse_to_text - Example commands for including a sound output:
python -m text_morse_code_converter --text "HELLO WORLD" --sound
How to run unit tests
Some example unit tests are included within the tests directory. To run these tests...
- Follow steps in development set up.
- Install
pytestinto the virtual environment by the commandpipenv install pytest. - Run
pipenv run pytestin the main project directory. - Tests should never fail. Any failed tests indicate that the production code is behaving differently from the behavior expected.
Continuous integration
This project has a continuous integration workflow that builds and runs unit tests with every code update to Github.
How to contribute
We welcome contributions from the community. To set up the development environment:
- Clone this repo.
- Follow the steps in development set up.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file text_morse_code_converter-0.1.2.tar.gz.
File metadata
- Download URL: text_morse_code_converter-0.1.2.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22d577e910661725ee212cbeece217bd4ccef808c00bda7cb680104649baa362
|
|
| MD5 |
da299b7858bae0b3d85e8eaacab6a5e8
|
|
| BLAKE2b-256 |
55ed5bfd32432fd29806388d06e8815012740815f5965ca6696eabb728c7fca9
|
File details
Details for the file text_morse_code_converter-0.1.2-py3-none-any.whl.
File metadata
- Download URL: text_morse_code_converter-0.1.2-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69eb45558d927d042fa6f70a545fc82d627ce15a1adfc4856d210970ebc5ed64
|
|
| MD5 |
772b03e3c4e11cbebfda5a2b10ca43e6
|
|
| BLAKE2b-256 |
475435f9eaef8a95fd714de72f7cc7bfd78cd237019970c44fd706f9fbfa2f5e
|