gotools

command module
v0.0.0-...-5697e94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: MIT Imports: 26 Imported by: 0

README

gotools

A collection of command line tools written in Go

  • console - get the size of a console
  • counter - count up or down with big numbers
  • date-math - find difference between two dates
  • db - simple name/value storage
  • db2 - complex data storage with forms ; in progress
  • iif - inline if for scripting
  • isodate - current date in iso format because date stinks
  • md2html - template based HTML generator from markdown source
  • roll - rotate files like logs ; in progress
  • rpn - an RPN calculator
  • scale - console line chart scroler ; experimental
  • smatrix - like cmatrix but a little basic ; experimental
  • striper - remove spaces from lines or words
  • thru - Marshal-Unmarshal example

Details

iif

Inline If returns a value if the left and right operands meet a condition

Usage: iff -left 10 -test '==' -right 10

rpn

A Reverse Polish Notation calculator

rpn --interactive
rpn --formula 'formula'
echo 'formula' | rpn
    --pop return only last value
    --verbose print out some extra details

Use: 2 3 + print

scale

Usage:

echo 10 20 30 40 50 60 50 40 30 20 10 | scale -wait 10

↑⎺↑⎺↑⎺↑⎺↑⎺↑⎺⎻──⎼⎽
floor: 0.000000, avg: 32.727273, ceil: 60.000000
w=18, c=11

Arrows show a scale change, you can avoid them by setting a ceil or floor value through command line flags.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL