Show HN: Flatito, grep for YAML and JSON files (github.com)
It is a kind of grep for YAML and JSON files. It allows you to search for a key and get the value and the line number where it is located.
I created this tool because I sometimes struggle to find specific keys in typical i18n rails yamls. In the views, you don't always have the whole key, but it is extrapolated from the context. I am sure there are other use cases; I hope you find it useful.
Cheers!
24 comments
[ 3.0 ms ] story [ 55.8 ms ] threadhttps://github.com/tomnomnom/gron
Oddly, Wiktionary has an article for sideache² and a link to that page if you look for side stitch. Makes me curious how often that is the case now. [/me sniped]
¹ https://en.wikipedia.org/wiki/Side_stitch
² https://en.wiktionary.org/wiki/sideache
It doesn't do quite the same thing, but a tool I've had good luck with for quick-n-dirty grepping of JSON is gron:
https://github.com/tomnomnom/gron
(which I'm sure I learned about from a thread like this on HN...)
It sort of "flattens out" your JSON to allow you to do whatever you want to it (grepping, for one thing!). Then you can even turn gron's output back into JSON with `ungron`.
Maybe someone will find it a useful toolbox addition, much like the Flatito looks to be!