• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/H12-Jul-2020-362259

MANIFEST.inH A D14-Apr-2019125 107

PKG-INFOH A D12-Jul-20203.9 KiB13289

README.rstH A D12-Jul-20201.1 KiB5033

bootstrap.pyH A D14-Apr-20196.3 KiB190126

buildout.cfgH A D12-Jul-202091 97

setup.cfgH A D12-Jul-2020430 3426

setup.pyH A D12-Jul-20201.6 KiB4743

tox.iniH A D12-Jul-20201.3 KiB7670

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