Skip to main content

A simple Morse code converter

Project description

CI

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

  1. Install Python (3.11+), pipenv, and Git.
  2. Make sure pipenv is installed pip install pipenv
  3. Activate the virtual environment with pipenv shell
  4. 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...

  1. Follow steps in development set up.
  2. Install pytest into the virtual environment by the command pipenv install pytest.
  3. Run pipenv run pytest in the main project directory.
  4. 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:

  1. Clone this repo.
  2. Follow the steps in development set up.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text_morse_code_converter-0.1.2.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_morse_code_converter-0.1.2-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file text_morse_code_converter-0.1.2.tar.gz.

File metadata

File hashes

Hashes for text_morse_code_converter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 22d577e910661725ee212cbeece217bd4ccef808c00bda7cb680104649baa362
MD5 da299b7858bae0b3d85e8eaacab6a5e8
BLAKE2b-256 55ed5bfd32432fd29806388d06e8815012740815f5965ca6696eabb728c7fca9

See more details on using hashes here.

File details

Details for the file text_morse_code_converter-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for text_morse_code_converter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 69eb45558d927d042fa6f70a545fc82d627ce15a1adfc4856d210970ebc5ed64
MD5 772b03e3c4e11cbebfda5a2b10ca43e6
BLAKE2b-256 475435f9eaef8a95fd714de72f7cc7bfd78cd237019970c44fd706f9fbfa2f5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page