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:

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.1.0.tar.gz (5.4 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.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: morse_lab-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 8d4268e184ab4fd6a0aea5ff927e329256b94e881f10cdc4bbb1e0be4db546ad
MD5 d66f0a166c635a436a873129663f1d9d
BLAKE2b-256 84459266d71aa14bae3300fcb3c489259533f1794150ae7a4f4e4f00a8b93d3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for morse_lab-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: morse_lab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a63f91f0ebef65ef7ffdd2f8d91ba19f251c5430c3839c8035a0bce4fe9d8848
MD5 eda0f7d66576423038a3e4d0aa6a385a
BLAKE2b-256 d55de9dd9931be4dbef16d40c89f76ec13c81287cec6bccd3fd3770498ba232e

See more details on using hashes here.

Provenance

The following attestation bundles were made for morse_lab-0.1.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