App::PipeFilters - JSON in the Shell
I've just put App::PipeFilters on github for review before I inflict them on CPAN.
They're a small set of UNIX command line tools for working with structured data. In particular, JSON objects, one per line. They're compatible with many UNIX command line tools like sort and uniq. From the README:
% head −1 sample.json
{"network":"freenode","channel":"#perl","nick":"dngor","karma":"120"}
% jcut −o network −o channel < sample.json | sort | uniq
{"network":"efnet","channel":"#perl"}
{"network":"efnet","channel":"#poe"}
{"network":"efnet","channel":"#reflex"}
{"network":"freenode","channel":"#perl"}
{"network":"freenode","channel":"#poe"}
{"network":"freenode","channel":"#reflex"}
{"network":"magnet","channel":"#perl"}
{"network":"magnet","channel":"#poe"}
{"network":"magnet","channel":"#reflex"}
The new repository contains just a few tools for working on JSON data. The goal is to let UNIX do most of the work. ☺
- jcut is like cut(1) but understands named fields
- jmap renames JSON fields
- json2yaml reads JSON and writes YAML, which may be easier for some to read.
- jsort is like sort(1) but -k names JSON fields
- mysql2json reads mysql(1) batch files (-B flag) and writes JSON
ooh, interesting.
when I find a use for this I'll be very excited. :-)
Neat.
You should include the dzil built tarball into the repo as well, so people can easily check it out without having to install the 58 dzil deps.
Thanks for the suggestion, but I'd rather keep tarballs out of the repository. I'm working towards a CPAN release not too long from now. First I need to add a small set of crucial features.
As promised, App::PipeFilter 0.001 is on PAUSE now, and will appear at your favorite CPAN mirror shortly.