Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/melezhik/catmandu-sparrow
Simple wrapper for Catamandu cli
https://github.com/melezhik/catmandu-sparrow
catmandu data-processing sparrow
Last synced: 10 days ago
JSON representation
Simple wrapper for Catamandu cli
- Host: GitHub
- URL: https://github.com/melezhik/catmandu-sparrow
- Owner: melezhik
- Created: 2017-10-05T21:00:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-06T10:47:11.000Z (about 7 years ago)
- Last Synced: 2024-11-05T22:03:10.371Z (about 2 months ago)
- Topics: catmandu, data-processing, sparrow
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes.md
Awesome Lists containing this project
README
# SYNOPSIS
Simple wrapper for [Catmandu cli](https://metacpan.org/pod/distribution/Catmandu/bin/catmandu)
# INSTALL
$ sparrow plg install catmandu
# USAGE
Basic usage:
$ sparrow plg run catmandu --
For example:
# read data from stdin and write to stdout
$ sparrow plg run catmandu -- convert JSON to YAML# read data from /path/to/file.json and write to /path/to/file.yaml
$ sparrow plg run catmandu \
--param in=/path/to/file.json \
--param out=/path/to/file.yaml \
-- convert JSON to YAMLFor catmandu parameters follow [Catmandu documentation](https://metacpan.org/pod/distribution/Catmandu/bin/catmandu)
# Automation
By sparrow tasks:
$ sparrow project create utils
$ sparrow task add utils json-to-yaml catmandu
$ sparrow task ini utils/json-to-yaml
---
out: /path/to/file.yaml
args:
- convert
- JSON
- to
- YAML$ sparrow task run utils/json-to-yaml --param in=/path/to/file.json
Or if you prefer remote run, use Sparrowdo:
$ cat sparrowfile
task-run "convert json to yaml", "catmandu", %(
in => '/path/to/file.json',
out => '/path/to/file.yaml',
args => (
( 'convert', 'JSON', 'to', 'YAML')
)
);$ sparrowdo --host=$host # run on remote host
# Author
* The plugin maintainer is [Alexey Melezhik](https://github.com/melezhik/)