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.
Metadata
Release files for pandukabhaya 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pandukabhaya-1.0.1.tar.gz | 13.7 kB | With provenance | Details for pandukabhaya-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandukabhaya-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pandukabhaya-1.0.1-py3-none-any.whl |
Total release size: 25.7 kB
Release files / pandukabhaya-1.0.1.tar.gz
| Download URL | pandukabhaya-1.0.1.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
924a7af7d0b752a46ef4ea5bfab4cd344cb283267faefbf192752c3fde4d275f
|
|
BLAKE2b-256 checksum How to use checksums |
3b694dda221838bd19c9c50250226d0425ff63f0ab39ab98a0f2a9f5b072da10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 24, 2025.
Transparency logRelease files / pandukabhaya-1.0.1-py3-none-any.whl
| Download URL | pandukabhaya-1.0.1-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e27217b895b42d7816d8b8abf3bd45ac76505d456c91f1144eb958f9f1488f4
|
|
BLAKE2b-256 checksum How to use checksums |
78123e0d5d1270bb6e474286e3f1ebd4bd9d9879f8f319803a4874a18284ebdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 24, 2025.
Transparency logSecurity for pandukabhaya 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pandukabhaya-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 24, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.