Skip to content

baalimago/percentaverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A tool which takes some input, finds all percentage-strings, then averages them.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages