Read and write numbers in alphabetic numeral systems
Project description
Omninumeric
🌏 English Русский
Omninumeric provides support for number reading and writing in alphabetic numeral systems.
Supported numeral systems
- Cyrillic
- Roman - WIP
- Byzantian Greek - WIP
- Modern Greek - planned
- Hebrew - planned
Background
See Introduction to learn about Cyrillic numeral system.
Installation
pip install omninumeric
Usage
from omninumeric import cyrillic
# Convert a number into Cyrillic
# Requires non-zero int, returns str
a = cyrillic.write(1)
# Convert a Cyrillic number to Arabic
# Requires non-empty str, returns int
b = cyrillic.read("а҃")
"Delimiter" and "plain" style numbers are supported both for reading and writing, "plain" style is used by default for writing.
When writing into Cyrillic, several falgs can be used:
# DELIM flag sets conversion to "delimeter" style
c = cyrillic.write(111111, cyrillic.DELIM)
# NOTITLO flag omits "titlo" decorator
d = cyrillic.write(11000, cyrillic.DELIM | cyrillic.NOTITLO)
# Following flags control dot styling:
#
# ENDDOT - append dot at the end
# WRAPDOT - append dot at both ends
# DELIMDOT - add dot separator between digit groups. Sets conversion to "delim" style
# ALLDOT - combine WRAPDOT and DELIMDOT
Contributing
Create an issue describing a bug or suggestion, then create a pull request mentioning the issue.
Feedback
Drop me a line: amshoor@gmail.com
Changelog
See Changelog.
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
omninumeric-2.0.0.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for omninumeric-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af17f3939d8ff9ccc391d371305da79d55b073cd4c3ea28f35463acf9df7da76 |
|
MD5 | 1da4cb960673330172c5f9e80c82293f |
|
BLAKE2b-256 | f0b29973c3d64aed2ad1b9a3a8bda9367a40f3c6117bd4f79625eef1b647d9ad |