Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/librecat/catmandu-fix-cmd
Pipe data to be fixed through an external process
https://github.com/librecat/catmandu-fix-cmd
Last synced: 4 days ago
JSON representation
Pipe data to be fixed through an external process
- Host: GitHub
- URL: https://github.com/librecat/catmandu-fix-cmd
- Owner: LibreCat
- Created: 2013-03-28T12:11:58.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2021-02-21T16:13:26.000Z (over 3 years ago)
- Last Synced: 2024-05-09T11:37:46.160Z (6 months ago)
- Language: Perl
- Homepage: https://metacpan.org/pod/Catmandu::Fix::cmd
- Size: 7.81 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# NAME
Catmandu::Fix::cmd - pipe data to be fixed through an external process
# DESCRIPTION
This [Catmandu::Fix](https://metacpan.org/pod/Catmandu::Fix) passes data as a JSON object to an external process over
stdin and reads a JSON object from it's stdout.# SYNOPSIS
my $fixer = Catmandu::Fix->new(fixes => [
# pipe data through the jq command-line json processor
# keeping only the title field
'cmd("jq -c -M {title}")',
# ...
]);# a canonical external program in perl
use JSON;
while () {
my $data = decode_json($_);
# ...
print encode_json($data);
}# CONTRIBUTORS
Nicolas Steenlant, ``
Jakob Voss `jakob.voss at gbv.de`
# LICENSE
This is free software; you can redistribute it and/or modify it under the same
terms as the Perl 5 programming language system itself.