Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 687 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 687 Bytes

percentaverage

A tool which finds all precentages in a file and averages them. Matches x.y%, x,y%, -x.y%.

Test coverage: 77.4% 😌👏

Installation

go install github.com/baalimago/percentaverage@latest

Usage

echo "20,3% 19.9% -0.2%" | percentaverage && echo
go test ./... -cover | percentaverage -r `# This will output the percentage wihout a '%' sign`

Roadmap

  • Parse stdin
  • Hyperdrive the parsing for fun (fun not guaranteed)
  • Parse file from -f flag
  • Parse all files from directory using -d flag
  • Paralellized parsing
  • Glob parsing using -g flag
  • Glob parsing using multi-arguments