Cyrillic numeral system numbers conversion
Project description
cu-numbers
A program for numbers conversion between Arabic and Cyrillic (further CU) numeral systems.
Background
See Introduction to learn about CU numeral system.
Installation
pip install cu-numbers
Usage
import cunumbers
# Convert an Arabic number to CU
# Requires non-zero int, returns str
a = cunumbers.to_cu(1)
# Convert a CU number to Arabic
# Requires str, returns int
b = cunumbers.to_arab("а҃")
"Delimiter" and "plain" style numbers are supported in both directions. "Delimeter" style is default for CU-wise conversions.
# Use CU_PLAIN flag to use "plain" style in CU-wise conversion
c = cunumbers.to_cu(111111, CU_PLAIN)
# Use CU_NOTITLO flag to omit "titlo"
d = cunumbers.to_cu(11000, CU_PLAIN + CU_NOTITLO)
# Use following flags in CU-wise conversion to add dot-styling:
# CU_ENDDOT - append dot at the end
# CU_WRAPDOT - append dot at both ends
# CU_DELIMDOT - add dot between each group in "delimeter" style.
# Sets conversion to "delim" style.
# CU_ALLDOT = combine CU_WRAPDOT and CU_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
cu-numbers-1.3.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for cu_numbers-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a90a98a4bdc1ab6a24326422dd6fdf07f371bcb2587c92a6b39fc1caf6329a00 |
|
MD5 | f5c3687c1ff80e977e1b48619a9c45bd |
|
BLAKE2b-256 | 92a071d29496225685f88795bd9000aaf658934cd0ea6e97d2fd1143c989eec6 |