Skip to main content

A Python package for Morse code conversion, including Japanese support.

Project description

Morse Lab

A package for Morse code conversions.

Features

  • Convert text to Morse code.
  • Convert Morse code to text.
  • Supports Japanese Wabun Morse Code.

Installation

You can install the package using pip:

pip install git+https://github.com/rushiharkal1/morse_lab.git

or

pip install morse-lab

Usage

from morse_lab import text_to_morse_code, morse_code_to_text, japanese_to_english

# Convert text to Morse
print(text_to_morse_code("HELLO WORLD"))  # Output: ".... . .-.. .-.. ---  / .-- --- .-. .-.. -.. "

# Convert Morse to text
print(morse_code_to_text(".... . .-.. .-.. ---"))  # Output: "HELLO"

# Convert Japanese Katakana to English
print(japanese_to_english("コンニチハ"))  # Output: "KO N NI CHI HA"

Running Tests

You can run the tests using pytest:

First, clone the repository:

git clone https://github.com/rushiharkal1/morse_lab.git

Then, install pytest if you haven't already:

pip install pytest

Now, you can run the tests:

python -m pytest tests/

License

This project is licensed under the MIT License.

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

morse_lab-0.2.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

morse_lab-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file morse_lab-0.2.0.tar.gz.

File metadata

  • Download URL: morse_lab-0.2.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for morse_lab-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d3b90da4ea494de11d509b2c936c4910d5b5034de4a17d2d95625b8df1550462
MD5 1d9230987ccea5df1d8a689a422fa237
BLAKE2b-256 4a8cd2c440529b2766c7e469789bd12b0c9459a0697d81e82feb3cdcd28f8a46

See more details on using hashes here.

Provenance

The following attestation bundles were made for morse_lab-0.2.0.tar.gz:

Publisher: python-publish.yml on rushiharkal1/morse_lab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file morse_lab-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: morse_lab-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for morse_lab-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28e87c7df06e4cfb9fb32686a904fd1254f8af79e99457e10e4427dd858e9fe9
MD5 dc3a89b4c317c88d4987217eb8c51ed2
BLAKE2b-256 a47d19653baa80512bf2db93806a0e5ba7c6c98ce7765535471ef0f4e40d60f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for morse_lab-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on rushiharkal1/morse_lab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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