An ASCII to Unicode text converter for 'FM Abhaya' Sinhala font, with extensibility for other fonts via JSON mappings.
Project description
Pandukabhaya
Pandukabhaya is an ASCII to Unicode text converter. Currently, it only supports the 'FM Abhaya' ASCII Sinhala font, but other font mappings will be added in the future. Pandukabhaya is written as a generic text conversion tool that uses JSON mappings to transform text. Therefore, it can be used to convert any text given the mapping.
Name
The most famous Sinhala ASCII font is 'FM Abhaya' named after King Abhaya (474 BCE to 454 BCE). The tool is named after his nephew, who was named after King Abhaya and King Panduvasdeva. Pandukabhaya accended to the throne replacing Abhaya (technically Tissa succeeded to the throne right after Abhaya. But we chose the most notable successor 😀)
Features
- A iteratively generated mapping file for 'FM Abhaya' font.
- Loads mappings from JSON files for flexibility.
- Command-line interface for quick and easy usage.
Installation
Package is pending release in Pypi. For now clone the repository and install from the clone.
pip install pandukabhaya
Usage
As a CLI Tool
pandukabhaya <mapping_name> -t <text>
pandukabhaya <mapping_name> -t <text> -o <output_file>
pandukabhaya <mapping_name> -i <input_file> -o <output_file>
As a Python Module
from pandukabhaya import Converter
converter = Converter("fm_abhaya")
output = converter.convert("rkaosl")
print(output)
Run tests
python -m unittest tests.test_converter
Folder Structure and Explanations
PANDUKABHAYA/
├── pandukabhaya/
│ ├── cli.py
│ ├── converter.py
│ └── mappings/
│ └── fm_abhaya.json
├── scripts/
│ ├── generation.ipynb
│ └── prep.ipynb
└── tests/
├── test_cases.json
└── test_converter.py
pandukabhaya/: Core package directory containing the simple code modules (cli.py, converter.py)mappings/: Contains mapping files.
scripts/: Contains Jupyter notebooks and mapping files for data analysis, preparation, and generation processes.- prep.ipynb - Cleans and corrects the UCSC mapping file.
- generation.ipynb - Using improved UCSC mappings as a guide, generates mappings iteratively
tests/: Contains unit test scripts and test data to ensure code quality and functionality.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pandukabhaya-1.0.1.tar.gz.
File metadata
- Download URL: pandukabhaya-1.0.1.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
924a7af7d0b752a46ef4ea5bfab4cd344cb283267faefbf192752c3fde4d275f
|
|
| MD5 |
dcb1f4a601cbe720808bd07b2160f177
|
|
| BLAKE2b-256 |
3b694dda221838bd19c9c50250226d0425ff63f0ab39ab98a0f2a9f5b072da10
|
Provenance
The following attestation bundles were made for pandukabhaya-1.0.1.tar.gz:
Publisher:
publish.yml on akuruAI/Pandukabhaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pandukabhaya-1.0.1.tar.gz -
Subject digest:
924a7af7d0b752a46ef4ea5bfab4cd344cb283267faefbf192752c3fde4d275f - Sigstore transparency entry: 165093282
- Sigstore integration time:
-
Permalink:
akuruAI/Pandukabhaya@80fcba2ab0b83d32ac111d6ef542b1941de7c97a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/akuruAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@80fcba2ab0b83d32ac111d6ef542b1941de7c97a -
Trigger Event:
release
-
Statement type:
File details
Details for the file pandukabhaya-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pandukabhaya-1.0.1-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e27217b895b42d7816d8b8abf3bd45ac76505d456c91f1144eb958f9f1488f4
|
|
| MD5 |
6db8a4eec0fe10c61ec9ca76a3a8ff50
|
|
| BLAKE2b-256 |
78123e0d5d1270bb6e474286e3f1ebd4bd9d9879f8f319803a4874a18284ebdf
|
Provenance
The following attestation bundles were made for pandukabhaya-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on akuruAI/Pandukabhaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pandukabhaya-1.0.1-py3-none-any.whl -
Subject digest:
4e27217b895b42d7816d8b8abf3bd45ac76505d456c91f1144eb958f9f1488f4 - Sigstore transparency entry: 165093284
- Sigstore integration time:
-
Permalink:
akuruAI/Pandukabhaya@80fcba2ab0b83d32ac111d6ef542b1941de7c97a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/akuruAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@80fcba2ab0b83d32ac111d6ef542b1941de7c97a -
Trigger Event:
release
-
Statement type: