Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
src/ | H | 12-Jul-2020 | - | 362 | 259 | |
MANIFEST.in | H A D | 14-Apr-2019 | 125 | 10 | 7 | |
PKG-INFO | H A D | 12-Jul-2020 | 3.9 KiB | 132 | 89 | |
README.rst | H A D | 12-Jul-2020 | 1.1 KiB | 50 | 33 | |
bootstrap.py | H A D | 14-Apr-2019 | 6.3 KiB | 190 | 126 | |
buildout.cfg | H A D | 12-Jul-2020 | 91 | 9 | 7 | |
setup.cfg | H A D | 12-Jul-2020 | 430 | 34 | 26 | |
setup.py | H A D | 12-Jul-2020 | 1.6 KiB | 47 | 43 | |
tox.ini | H A D | 12-Jul-2020 | 1.3 KiB | 76 | 70 |
README.rst
1.. image:: https://travis-ci.org/zopefoundation/roman.svg?branch=master 2 :target: https://travis-ci.org/zopefoundation/roman 3 4.. image:: https://coveralls.io/repos/github/zopefoundation/roman/badge.svg?branch=master 5 :target: https://coveralls.io/github/zopefoundation/roman?branch=master 6 7.. image:: https://img.shields.io/pypi/v/roman.svg 8 :target: https://pypi.org/project/roman/ 9 :alt: Current version on PyPI 10 11.. image:: https://img.shields.io/pypi/pyversions/roman.svg 12 :target: https://pypi.org/project/roman/ 13 :alt: Supported Python versions 14 15roman 16===== 17 18Small helper library to convert arabic to roman numerals. 19 20There are two ways to use this library. 21 221. Importing it into your application 23 24.. code-block:: python 25 26 import roman 27 28 # to roman 29 number = int(input('> ')) # 10 30 print(roman.toRoman(number)) 31 32 # from roman 33 number = input('> ') # X 34 print(roman.fromRoman(number)) 35 36 372. ``roman`` CLI command 38 39.. code-block:: bash 40 41 ~$ roman 972 42 CMLXXII 43 # use the -r/--reverse to conver Roman numerals 44 ~$ roman -r CMLXXII 45 972 46 # case insensitive 47 ~$ roman -r cMlxxii 48 972 49 50