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