Convert roman numbers to integers and vice-versa in pipes
Go to file
2024-07-07 15:40:42 +02:00
.gitignore Fixed buffer overflows, makefile 2022-10-04 15:48:54 +02:00
arabic.txt Add files via upload 2021-10-06 17:50:47 +02:00
LICENSE Create LICENSE 2021-10-18 08:58:18 +02:00
Makefile Improved (after some years) 2024-07-07 15:40:42 +02:00
README.md Improved (after some years) 2024-07-07 15:40:42 +02:00
roman.txt Add files via upload 2021-10-06 17:50:47 +02:00
ropipe.1 Improved (after some years) 2024-07-07 15:40:42 +02:00
ropipe.c Improved (after some years) 2024-07-07 15:40:42 +02:00

Ropipe

License c

Convert Roman numbers to integers and vice-versa in pipes.

What is ropipe?

Ropipe converts base-10 integers to Roman numbers and vice versa, reading from stdin and printing to stdout. It is designed to be used primarily in pipes. By default, it converts integers to Roman numbers.

Options

  • -r: Roman to integer conversion. Integer to Roman is the default behavior.
  • -h: Display help message and exit.
  • -s: Fail silently, with no output on invalid input.
  • -q: Accept quirky Roman numerals like IIII for IV.
  • -k: Don't quit on invalid input; continue processing subsequent inputs.

You can use the options concatenated, like -rsk or individually, like -r -s -k.

Installation

  1. Clone this repository:

    git clone https://github.com/MatMasIt/ropipe.git
    cd ropipe
    
  2. Compile and install:

    sudo make install
    

    or

    doas make install
    

    The program is compiled during installation. You may review the script and the program before proceeding.

Examples

Once installed, you can use ropipe in your shell commands. Below are some examples:


Example 1:

ropipe < arabic.txt

Result:

I
X
CXXIII
CCCXXI

Example 2:

ropipe -r < roman.txt

Result:

4
5
7
1200

Manpage

A manpage is installed alongside the program. You can access it by running:

man ropipe

Updates

There is no automatic update system currently implemented. Please visit ropipe GitHub repository regularly to check for updates. To update, download the latest version and re-run the installer.

Nontheless, it's not a program that one would expect to change often, so manual updates should be rare.

Make commands

  • make: compile ropipe
  • make install: install ropipe
  • make uninstall: uninstall ropipe