Simple(r) text searching. A Marvin companion app.
via go:
$ go get -u github.com/kcmerrill/kronk
kronk
requires input via stdin
. Many ways to get data via stdin, but in this example we'll simply cat
or curl
a file into kronk
.
$> stdin | kronk <arguments> <name:regular-expression>...
A simple 1 match example:
$> curl https://api.github.com/users/kcmerrill/repos | kronk 'repo:"full_name": "(.*?)"'
Multiple matches(must all yeild the same number of results)
$> curl https://api.github.com/users/kcmerrill/repos | kronk 'repo:"full_name": "(.*?)"' 'issues:"open_issues": (\d+)'
Using Marvin? Need dynamic inventory? Just remember to use the appropriate del
based on your needs.
$> curl https://api.github.com/users/kcmerrill/repos | kronk --out inline 'repo:"full_name": "(.*?)"' 'issues:"open_issues": (\d+)'