extra-utils

Crates.ioextra-utils
lib.rsextra-utils
version1.0.0
sourcesrc
created_at2019-06-04 19:57:51.861773
updated_at2020-10-15 19:30:43.725568
descriptionSet of additional command line utilities
homepagehttps://github.com/jayden-chan/extra-utils/README.md
repositoryhttps://github.com/jayden-chan/extra-utils.git
max_upload_size
id139002
size33,246
Jayden Chan (jayden-chan)

documentation

https://github.com/jayden-chan/extra-utils/README.md

README

extra-utils crates.io

This repository contains some handy command line utilities that aren't included in the GNU coreutils. They follow the UNIX philosophy.

A lot of the tools here already exist in other languages/packages. The purpose of this project is more for fun/learning than it is for actual innovation or utility.

Installation

cargo install extra-utils

Commands

se

A simple HTTP server that serves a static folder

Usage: se [port] [folder]

The default port is 3000 and the default folder is . (current folder)

If only one argument is provided, its purpose will be inferred:

se build

will serve the "build" folder on port 3000 and:

se 8080

will serve the current folder on port 8080.

If the requested file doesn't exist, se will attempt to fallback to {folder}/404.html. Failing that, it will return HTTP 404 with an empty body.

ts

Prepend a timestamp to each line in STDIN

Usage: your_command | ts [format]

The default format is "[%Y-%m-%d %H:%M:%S]"

nth

Select the nth line(s) from STDIN

Usage: your_command | nth <start> [end]

Where start is the starting line to print, and end is the optional end index to print. If end is omitted or is less than start, only the start'th line will be printed

nr

Prepend line line numbers to STDIN

Usage: your_command | nr [minwidth] [offset]

minwidth is the minimum width of the number column. Default: 0

offset is the starting index of the line numbers. Default: 1

Commit count: 43

cargo fmt