Skip to content

A command-line program and library for parsing and generating Roman numerals

License

Notifications You must be signed in to change notification settings

alexherbo2/roman-numeral.rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roman-numeral.rb

A command-line program and library for parsing and generating Roman numerals.

Dependencies

Installation

Run the following in your terminal:

make install

Usage

roman-numeral [arguments]

Examples

roman-numeral 42
# XLII
roman-numeral XLII
# 42
roman-numeral 1 3
# I
# II
# III
roman-numeral 1 3 9
# I
# II
# III
# IX
roman-numeral --format '[%s]' --separator '-' 1 3
# [I]-[II]-[III]
echo I III | roman-numeral --separator '+' | bc
# 6

Options

--arabic / -i
  Convert to Arabic (Integer) numeral.

--roman / -s
  Convert to Roman (String) numeral.

--exclusive / -x
  Make the range exclusive.

--format / -f FORMAT
  Set text format (Default: %s).

--separator / -j SEPARATOR
  Configure separator (Default: ␤).

--help / -h
  Display a help message and quit.

About

A command-line program and library for parsing and generating Roman numerals

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published