Metadata-Version: 2.4
Name: xnum
Version: 1.2
Summary: XNum: Universal Numeral System Converter
Home-page: https://github.com/openscilab/xnum
Download-URL: https://github.com/openscilab/xnum/tarball/v1.2
Author: XNum Development Team
Author-email: xnum@openscilab.com
License: MIT
Project-URL: Source, https://github.com/openscilab/xnum
Keywords: convert numeral number numeral-system digits
Classifier: Development Status :: 5 - Production/Stable
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Manufacturing
Classifier: Topic :: Education
Classifier: Topic :: Text Editors :: Text Processing
Classifier: Topic :: Software Development :: Localization
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary


<div align="center">
    <img src="https://github.com/openscilab/xnum/raw/main/otherfiles/logo.png" alt="XNum Logo" width="220">
    <h1>XNum: Universal Numeral System Converter</h1>
    <br/>
    <a href="https://badge.fury.io/py/xnum"><img src="https://badge.fury.io/py/xnum.svg" alt="PyPI version"></a>
    <a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3"></a>
    <a href="https://codecov.io/gh/openscilab/xnum"><img src="https://codecov.io/gh/openscilab/xnum/graph/badge.svg?token=0R14OKY0TB"></a>
    <a href="https://github.com/openscilab/xnum"><img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/openscilab/xnum"></a>
    <a href="https://discord.gg/h8T2F8WpFN"><img src="https://img.shields.io/discord/1064533716615049236.svg" alt="Discord Channel"></a>

</div>

----------


## Overview
<p align="justify">
<b>XNum</b> is a simple and lightweight Python library that helps you convert digits between different numeral systems — like English, Persian, Hindi, Arabic-Indic, Bengali, and more.
It can automatically detect mixed numeral formats in a piece of text and convert only the numbers, leaving the rest untouched. Whether you're building multilingual apps or processing localized data, <b>XNum</b> makes it easy to handle numbers across different languages with a clean and easy-to-use API.
</p>

<table>
    <tr>
        <td align="center">PyPI Counter</td>
        <td align="center">
            <a href="https://pepy.tech/projects/xnum">
                <img src="https://static.pepy.tech/badge/xnum">
            </a>
        </td>
    </tr>
    <tr>
        <td align="center">Github Stars</td>
        <td align="center">
            <a href="https://github.com/openscilab/xnum">
                <img src="https://img.shields.io/github/stars/openscilab/xnum.svg?style=social&label=Stars">
            </a>
        </td>
    </tr>
</table>
<table>
    <tr> 
        <td align="center">Branch</td>
        <td align="center">main</td>
        <td align="center">dev</td>
    </tr>
    <tr>
        <td align="center">CI</td>
        <td align="center">
            <img src="https://github.com/openscilab/xnum/actions/workflows/test.yml/badge.svg?branch=main">
        </td>
        <td align="center">
            <img src="https://github.com/openscilab/xnum/actions/workflows/test.yml/badge.svg?branch=dev">
            </td>
    </tr>
</table>
<table>
    <tr> 
        <td align="center">Code Quality</td>
        <td align="center"><a href="https://www.codefactor.io/repository/github/openscilab/xnum"><img src="https://www.codefactor.io/repository/github/openscilab/xnum/badge" alt="CodeFactor"></a></td>
        <td align="center"><a href="https://app.codacy.com/gh/openscilab/xnum/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/bf656e2daeeb45569dcc0cae705bc69d"></a></td>
    </tr>
</table>


## Installation

### PyPI
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
- Run `pip install xnum==1.2`
### Source code
- Download [Version 1.2](https://github.com/openscilab/xnum/archive/v1.2.zip) or [Latest Source](https://github.com/openscilab/xnum/archive/dev.zip)
- Run `pip install .`

## Usage

```pycon
>>> from xnum import convert, NumeralSystem
>>> print(convert("۱۲۳ apples & ꘤꘥꘦ cars", target=NumeralSystem.ENGLISH))
123 apples & 456 cars
>>> print(convert("۱۲۳ and 456", source=NumeralSystem.PERSIAN, target=NumeralSystem.HINDI))
१२३ and 456
```

ℹ️ By default, the `source` parameter is set to `NumeralSystem.AUTO`, which automatically detects the numeral system

## Supported numeral systems

- English
	- Standard
	- Fullwidth
	- Subscript
	- Superscript
	- Double-Struck
	- Bold
	- Monospace
    - Sans-Serif
    - Sans-Serif Bold
    - Circled
    - Dingbat Circled Sans-Serif
    - Dingbat Negative Circled Sans-Serif
    - Keycap
    - Emoji
- Persian
- Hindi
- Arabic-Indic
- Bengali
- Thai
- Khmer
- Burmese
- Tibetan
- Gujarati
- Odia
- Telugu
- Kannada
- Gurmukhi
- Lao
- Nko
- Mongolian
- Sinhala Lith
- Myanmar Shan
- Limbu
- Vai
- Ol Chiki
- Balinese
- New Tai Lue
- Saurashtra
- Javanese
- Cham
- Lepcha
- Sundanese
- Dives Akuru
- Modi
- Takri
- Newa
- Tirhuta
- Sharada
- Khudawadi
- Chakma
- Sora Sompeng
- Hanifi Rohingya
- Osmanya
- Meetei Mayek
- Kayah Li
- Gunjala Gondi
- Masaram Gondi
- Mro
- Wancho
- Adlam
- Tai Tham Hora
- Tai Tham Tham
- Nyiakeng Puachue Hmong

## Issues & bug reports

Just fill an issue and describe it. We'll check it ASAP! or send an email to [xnum@openscilab.com](mailto:xnum@openscilab.com "xnum@openscilab.com"). 

- Please complete the issue template

You can also join our discord server

<a href="https://discord.gg/h8T2F8WpFN">
  <img src="https://img.shields.io/discord/1064533716615049236.svg?style=for-the-badge" alt="Discord Channel">
</a>

## References

<blockquote>1- <a href="https://www.compart.com/en/unicode">Unicode - Compart</a></blockquote>

<blockquote>2- <a href="https://symbl.cc">SYMBL (◕‿◕) Symbols, Emojis, Characters, Scripts, Alphabets, Hieroglyphs and the entire Unicode</a></blockquote>

<blockquote>3- <a href="https://emojipedia.org/">📙 Emojipedia — 😃 Home of Emoji Meanings 💁👌🎍😍</a></blockquote>

## Show your support


### Star this repo

Give a ⭐️ if this project helped you!

### Donate to our project
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .			

<a href="https://openscilab.com/#donation" target="_blank"><img src="https://github.com/openscilab/xnum/raw/main/otherfiles/donation.png" width="270" alt="XNum Donation"></a>
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.2] - 2025-12-11
### Added
- English keycap mode
- English emoji mode
### Changed
- `convert` function modified
- Test system modified
- `README.md` updated
- Digits type changed to `list`
## [1.1] - 2025-11-10
### Added
- English circled mode
- English dingbat circled sans-serif mode
- English dingbat negative circled sans-serif mode
- Tai Tham Hora numeral system
- Tai Tham Tham numeral system
- Nyiakeng Puachue Hmong numeral system
### Changed
- Test system modified
## [1.0] - 2025-10-20
### Added
- Sora Sompeng numeral system
- Hanifi Rohingya numeral system
- Osmanya numeral system
- Meetei Mayek numeral system
- Kayah Li numeral system
- Gunjala Gondi numeral system
- Masaram Gondi numeral system
- Mro numeral system
- Wancho numeral system
- Adlam numeral system
### Changed
- `README.md` updated
- `Python 3.14` added to `test.yml`
## [0.9] - 2025-10-10
### Added
- Dives Akuru numeral system
- Modi numeral system
- Takri numeral system
- Newa numeral system
- Tirhuta numeral system
- Sharada numeral system
- Khudawadi numeral system
- Chakma numeral system
## [0.8] - 2025-09-28
### Added
- Vai numeral system
- Ol Chiki numeral system
- Balinese numeral system
- New Tai Lue numeral system
- Saurashtra numeral system
- Javanese numeral system
- Cham numeral system
- Lepcha numeral system
- Sundanese numeral system
### Changed
- Test system modified
## [0.7] - 2025-09-17
### Added
- Nko numeral system
- Mongolian numeral system
- Sinhala lith numeral system
- Myanmar shan numeral system
- Limbu numeral system
### Changed
- Test system modified
## [0.6] - 2025-09-05
### Added
- English double-struck mode
- English bold mode
- English monospace mode
- English sans-serif mode
- English sans-serif bold mode
### Changed
- `README.md` updated
- Test system modified
## [0.5] - 2025-09-01
### Added
- Lao numeral system
- English fullwidth mode
- English subscript mode
- English superscript mode
### Changed
- Test system modified
- `README.md` updated
## [0.4] - 2025-08-18
### Added
- Gurmukhi numeral system
- Kannada numeral system
- Telugu numeral system
### Changed
- Test system modified
- `README.md` updated
## [0.3] - 2025-08-05
### Added
- Tibetan numeral system
- Gujarati numeral system
- Odia numeral system
### Changed
- `README.md` updated
## [0.2] - 2025-07-28
### Added
- Thai numeral system
- Khmer numeral system
- Burmese numeral system
- Logo
### Changed
- Test system modified
- `target` parameter bug fixed
- `README.md` updated
## [0.1] - 2025-07-20
### Added
- English numeral system
- Persian numeral system
- Hindi numeral system
- Arabic-Indic numeral system
- Bengali numeral system


[Unreleased]: https://github.com/openscilab/xnum/compare/v1.2...dev
[1.2]: https://github.com/openscilab/xnum/compare/v1.1...v1.2
[1.1]: https://github.com/openscilab/xnum/compare/v1.0...v1.1
[1.0]: https://github.com/openscilab/xnum/compare/v0.9...v1.0
[0.9]: https://github.com/openscilab/xnum/compare/v0.8...v0.9
[0.8]: https://github.com/openscilab/xnum/compare/v0.7...v0.8
[0.7]: https://github.com/openscilab/xnum/compare/v0.6...v0.7
[0.6]: https://github.com/openscilab/xnum/compare/v0.5...v0.6
[0.5]: https://github.com/openscilab/xnum/compare/v0.4...v0.5
[0.4]: https://github.com/openscilab/xnum/compare/v0.3...v0.4
[0.3]: https://github.com/openscilab/xnum/compare/v0.2...v0.3
[0.2]: https://github.com/openscilab/xnum/compare/v0.1...v0.2
[0.1]: https://github.com/openscilab/xnum/compare/2ed44ad...v0.1
