14 releases

0.3.0 Mar 27, 2021
0.2.0 Feb 12, 2020
0.1.12 Feb 10, 2020
0.1.10 Oct 30, 2019
0.1.3 Jul 27, 2019

#1459 in Text processing

Download history 7/week @ 2024-04-01 57/week @ 2024-07-01

57 downloads per month

MIT license

89KB
2.5K SLoC

Romulus

A modern alternative to sed

Build Status

Versions

Currently while under development I will only be bumping patch versions rather then the normal minor versions until I feel like as if romulus is a somewhat mature release and ready for v1

Sample

given a executable file parse_ifconfig such as

#! /usr/bin/env romulus -f

/^(?P<inter>[a-zA-Z0-9]+): /,/^[a-zA-Z0-9]+:/ {
	/inet (?P<ip>[0-9]{1,3}(\.[0-9]{1,3}){3})/ {
		print("${inter}: ${ip}")
	}
}

running ifconfig | parse_ifconfig should yield your current network interfaces which have ips

Running the following prints all the hashes of the docker images that have kube in the name

docker images | romulus -e '2,$ & [/kube/, _, hash] print hash'

Installation

Currenty the only supported way to install romulus is to install by source code

$ cargo install romulus

Features

When rust programs are compiled a feature list may be passed.

color

On by default.

Error messages and other such things use ansi color codes.

envvar

On by default.

Preloads all the environmental variables into the base variable stack

stdin-tty

Off by default

Allows processing from interactive terminal.

bind

Off by default

Allows the use of the bind statement (expirimental). Sets global variable from local variable.

Dependencies

~4–14MB
~168K SLoC