Small helper library to convert arabic to roman numerals.
There are two ways to use this library.
- Importing it into your application
import roman
# to roman
number = int(input('> ')) # 10
print(roman.toRoman(number))
# from roman
number = input('> ') # X
print(roman.fromRoman(number))
roman
CLI command
~$ roman 972
CMLXXII
# use the -r/--reverse to convert Roman numerals
~$ roman -r CMLXXII
972
# case insensitive
~$ roman -r cMlxxii
972