Python utilities library for converting, analyzing, and testing Gurmukhi strings
Project description
Gurmukhi Utils
Python utilities library for converting, analyzing, and testing Gurmukhi strings. This project is an original work inspired by the JavaScript library gurmukhi-utils.
WIP
This library is a work in progress! Note that the API can change unexpectedly when upgrading. It will not be using SemVer until version 1.0.0. Please do not use for critical projects yet.
Installation
pip3 install gurmukhiutils
poetry add gurmukhiutils
Usage
This is a cursory overview of the functions available. To learn more, see any function's docstring in the source code.
Module gurmukhiutils.unicode
unicode
- Converts any ascii gurmukhi characters and sanitizes to unicode gurmukhi. Supports markup language of Sant Lipi.unicode_normalize
- Normalizes Gurmukhi according to Unicode Standards.sort_diacritics
- Orders the gurmukhi diacritics in a string according to Unicode standards.sanitize_unicode
- Use single char representations of constructed characters.
Module gurmukhiutils.convert
Converts text from a script to another. Currently only supports lossless Gurmukhi to Roman transliteration. Gurmukhi to Roman transcription is a WIP.
Module gurmukhiutils.remove
remove
- Removes substrings from string.remove_regex
- Removes regex patterns from string.remove_line_endings
- Attempts to remove line endings as best as possible.remove_vishrams
- Removes all vishram characters.
gurmukhiutils.ascii
- Converts Gurmukhi to ASCII for Open Gurbani Akhar font.
Example
>>> from gurmukhiutils.unicode import unicode
>>> unicode("gurU")
'ਗੁਰੂ'
>>> from gurmukhiutils.convert import convert
>>> convert("ਗੁਰੂ")
'gurū'
Contribute
If you want to help, please get started with the CONTRIBUTING.md doc.
Community
The easiest way to communicate is via GitHub issues. Please search for similar issues regarding your concerns before opening a new issue.
Get organization updates for Shabad OS by following us on Instagram and Twitter. We also invite you to join us on our public chat server hosted on Slack.
Our intention is to signal a safe open-source community. Please help us foster an atmosphere of kindness, cooperation, and understanding. By participating, you agree to abide by the Contributor Covenant.
If you have a concern that doesn't warrant opening a GitHub issue, please reach out to us:
Bhajneet S.K., Author, Maintainer, Project Lead: @bhajneet
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
Built Distribution
File details
Details for the file gurmukhiutils-0.3.1.tar.gz
.
File metadata
- Download URL: gurmukhiutils-0.3.1.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 510605c2df40360408491fa079555dea5bfd36e928746a0069bbafa421374327 |
|
MD5 | fea60aa9875aed982a923ce612ab3a3a |
|
BLAKE2b-256 | 96148ec1154b6f21fd08a0a3c07161f7f4538b3487111387ed5c48a1f0f67296 |
File details
Details for the file gurmukhiutils-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: gurmukhiutils-0.3.1-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/5.15.0-1031-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2c88a8194f03281bba17c1a2f315f279aa57901fd6b5861fc88dbfa7a4935f9 |
|
MD5 | fd185985a033d91a3733d0ef65c7579a |
|
BLAKE2b-256 | 3521a496ed3f49e4370c94fdf5ec6402f26c7ad27821172dfa92ee1049ddde39 |