Metadata-Version: 2.4
Name: PyMorseKit
Version: 0.2.0
Summary: A lightweight Python toolkit for encoding, decoding, and working with Morse code.
Home-page: https://github.com/Fmasterpro27/PyMorseKit
Author: fmasterpro27
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Fmasterpro27/PyMorseKit
Project-URL: Repository, https://github.com/Fmasterpro27/PyMorseKit
Project-URL: Issues, https://github.com/Fmasterpro27/PyMorseKit/issues
Keywords: morse,morse-code,encoding,decoding,telegraph,ham-radio,morse-translator,morse-encoder
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# PyMorseKit

> A lightweight Python library for encoding, decoding, and exporting Morse code as audio.

[![PyPI version](https://img.shields.io/pypi/v/PyMorseKit.svg)](https://pypi.org/project/PyMorseKit/)
[![Python versions](https://img.shields.io/pypi/pyversions/PyMorseKit.svg)](https://pypi.org/project/PyMorseKit/)
[![License](https://img.shields.io/pypi/l/PyMorseKit.svg)](LICENSE)

---

## Features

- Encode plain text to Morse code
- Decode Morse code back to text
- Export Morse code as WAV audio files
- Supports letters, numbers, and common punctuation
- Lightweight with no external dependencies

---

## Installation

```bash
pip install PyMorseKit
```

---

## Quick Start

```python
from pymorsekit import encode, decode

print(encode("SOS"))
# ... --- ...

print(decode("... --- ..."))
# SOS
```

---

## Audio Export

Generate Morse code audio and save it as a WAV file.

```python
from pymorsekit import save_audio

save_audio(
    text="SOS",
    output="sos.wav"
)
```

This creates a WAV file containing the Morse code audio for the provided text.

---

## API Reference

### `encode(text: str) -> str`

Convert plain text into Morse code.

```python
encode("HELLO WORLD")
# .... . .-.. .-.. --- / .-- --- .-. .-.. -..
```

### `decode(morse: str) -> str`

Convert Morse code back into plain text.

```python
decode(".... . .-.. .-.. --- / .-- --- .-. .-.. -..")
# HELLO WORLD
```

### `save_audio(text: str, output: str) -> str`

Generate Morse code audio and save it as a WAV file.

```python
save_audio("HELLO", "hello.wav")
```

---

## Supported Characters

| Category    | Examples                         |
| ----------- | -------------------------------- |
| Letters     | A-Z                              |
| Numbers     | 0-9                              |
| Punctuation | . , ? ! / ( ) : ; = + - \_ " $ @ |

---

## Contributing

Contributions, bug reports, and feature requests are welcome.

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push your branch
5. Open a pull request

---

## Author

Developed and maintained by **JackMa**

GitHub: https://github.com/Fmasterpro27

---

## License

This project is licensed under the Apache License 2.0.
