NAME
ndproc - nested data processor, extendable by modules
SYNOPSIS
ndproc [OPTIONS] <arguments>
DESCRIPTION
Process nested data structures according provided rules
OPTIONS
- --builtin-format <RAW|JSON|YAML>
-
Format for builtin rules and blames. Raw structure used by default.
- --builtin-rules <path>
-
Use builtin (in processed object) rules.
- --disable-module <modname>
-
Skip (don't process) rules for specified module. May be used several times.
- --dump-blame <file>
-
Dump blame to file.
- --dump-rules <file>
-
Dump rules to file.
- --embed-blame <path>
-
Embed blame into processed structure, using provided path.
- --embed-rules <path>
-
Embed used rules into processed structure, using provided path.
- --help|-h
-
Print a help message and exit.
- --ifmt <JSON|YAML>
-
Force specified input format usage. Will be selected automatically (using file name extension) if omitted. YAML::XS should be installed for YAML support.
- --list-modules|-l
-
List available modules.
- --module|-m <name>
-
Process structure using specified module.
- --ofmt <JSON|YAML>
-
Force specified output format usage. JSON is used by default; YAML::XS should be installed for YAML support, see "LIMITATIONS" in App::NDTools for more info.
- --rules <file>
-
Load rules from specified file. May be used several times.
- --verbose|-v [int]
-
Increase verbosity, max level is 4.
- --version|-V
-
Print version and exit.
AVAILABLE MODULES
Insert Insert value into structure
JsonMergePatch Apply JSON Merge Patch (rfc7396) patches
JsonPatch Apply JSON Patch (rfc6902) patches
Merge Merge structures according provided rules
Patch Apply nested diff to the structure
Pipe Modify structure using external process
Remove Remove specified parts from structure
EXAMPLES
Simply merge three files using module Merge
:
ndproc --module Merge a.json --source b.json --source c.json
Print usage for Merge
module:
ndproc --module Merge --help
EXIT STATUS
0 No errors occured.
1 Generic error code.
2 I/O Error.
4 Path related errors.
BUGS
Report bugs to https://github.com/mr-mixas/NDTools/issues
SEE ALSO
LICENSE AND COPYRIGHT
Copyright 2016-2019 Michael Samoglyadov <mixas at cpan.org>
.
This program is free software; you can redistribute it and/or modify it under the terms of GNU General Public License 3 or later versions.