Metadata-Version: 2.3
Name: koremu
Version: 1.0.0
Summary: Express integers as memorable, pronounceable strings.
Keywords: koremutake,encoding,integer,mnemonic
Author: Filip Salo
Author-email: Filip Salo <filip@infix.se>
License: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Project-URL: Homepage, https://codeberg.org/filipsalo/koremu
Project-URL: Repository, https://codeberg.org/filipsalo/koremu
Description-Content-Type: text/markdown

# koremu

Express integers as memorable, pronounceable strings — and turn them back
into integers.

Koremu maps each 7-bit chunk of a non-negative integer to one of 128
pronounceable syllables, so a number like `10610353957` becomes
`koremutake`. See <http://shorl.com/koremutake> for the original idea.

## Installation

```sh
uv add koremu
```

Or, from a checkout:

```sh
uv pip install .
```

## Usage

```python
>>> from koremu import encode, decode
>>> encode(10610353957)
'koremutake'
>>> decode('koremutake')
10610353957
```

Pad the output to a minimum number of syllables:

```python
>>> encode(0, syllables=3)
'bababa'
```

`encode` raises `ValueError` for negative numbers; `decode` raises
`ValueError` for strings that aren't valid koremutake.

## Development

This project is managed with [uv](https://docs.astral.sh/uv/).

```sh
uv sync          # set up the environment
uv run python -m unittest   # run the tests
uv build         # build the wheel and sdist
```

## License

MIT — see [LICENSE](LICENSE).
