gather streaks from an ordered, contiguous json array on stdin. results are printed in json to stdout.
Composable: Reads json from stdin and writes json to stdout. Use with other popular cli data tools like (jq and csvkit) to build powerful pipelines.
Portable: Easy, flexible installation options. Cross-platform, standalone executables (windows, linux, osx). Agnostic to database technology or application language.
Opinionated: Transformation, formatting, munging, grouping, sorting, looping, presentation are out of scope.
with npm:
npm install --global @tphummel/streak
or with homebrew:
brew install tphummel/util/streak
or download a standalone executable for your system. Put the file (or link) on your $PATH.
streak --help
- streak: two or more consecutive input rows that satisfy the criteria
- active streak: a streak which is still active once all input rows have been processed
- input data must be contiguous (not sparse, sufficiently filtered)
- input rows must be ordered oldest to newest
- output streaks list is ordered oldest to newest
- criteria can be a minimum value (>=), a maximum value (<=), or both, on a single column
- this is intended for small datasets. stdin is buffered in memory before processing.
git fetch --all
git checkout master
git pull
npm test
npm version (major|minor|patch)
git push && git push --tags
npm publish
wget https://github.com/tphummel/streak/archive/v1.0.1.tar.gz
openssl sha256 < v1.0.1.tar.gz
Open PR to homebrew tap with updated version and hash.
npm run release
tar -zcvf streak-v1.0.1-linux64.tar.gz streak-linux
tar -zcvf streak-v1.0.1-osx64.tar.gz streak-macos
tar -zcvf streak-v1.0.1-win64.exe.tar.gz streak-win.exe
Upload tars to the github release