YAML/JSON/EYAML/Compatible get/set/merge/validate/scan/convert/diff processors using powerful, intuitive, command-line friendly syntax.
ISC License
Bot releases are visible (Hide)
Published by wwkimball about 4 years ago
3.0.0:
Enhancements:
[.!=""]
.abc.d*
becomes abc[.^d]
, abc.*f
becomesabc[.$f]
, and abc.*e*
becomes abc[.=~/^.*e.*$/]
, and so on.---
document: 1
...
---
document: 2
{"document": 1}
{"document": 2}
yaml-merge --document-format=json file.yaml
oryaml-merge --document-format=yaml file.json
.yaml-set
command-line tool can now write changes to empty or minimally----
# The triple-dash is required.
Two versions of a minimally-viable JSON file:
{}
or:
[]
However, minimally-viable structure is necessary only for files with unusualyaml-set
command-line tool now accepts empty-String values.yaml-merge
command-line tool now permits overwriting one of its input--overwrite
is used instead of --output
; these are--backup
flag will cause the to-be-overwritten file to be renamedyaml-set
command-line tool now accepts an arbitrary set of characters--random
values via a new --random-from
argument.yaml-set
command-line tool now accepts documents from STDIN, causing ityaml-set
to operateyaml-get
and yaml-merge
.yaml-paths
command-line tool now accepts documents from STDIN. It alsoBug Fixes:
yaml-set
(True or False) withoutNon-Breaking API Changes:
parent
andparentref
parameters are now optional keyword arguments by the same names.data = get_yaml_data(get_yaml_editor(), ConsoleLogger(), "file.yaml")
if not data:
print("No data")
However, you can now differentiate between "No data" and "Invalid document"data = get_yaml_data(get_yaml_editor(), ConsoleLogger(), "file.yaml")
if data is None:
print("No data")
elif not data and isinstance(data, bool):
print("Invalid document")
else:
print("Got a non-empty document")
From this release forward, the version reported by all command-line tools is
synchronized with the version of the overall yamlpath installation.
Published by wwkimball about 4 years ago
Bug Fixes:
The yaml-merge command now reports version 0.0.4 to reflect these changes.
Published by wwkimball about 4 years ago
Enhancements:
Bug Fixes:
The yaml-merge command now reports version 0.0.3 to reflect these changes.
Published by wwkimball about 4 years ago
Bug Fixes:
Published by wwkimball about 4 years ago
Enhancements:
Please consider the new yaml-merge (version 0.0.1) a Beta version. Feel free to experiment with it and report any issues at https://github.com/wwkimball/yamlpath/issues!
Published by wwkimball about 4 years ago
Bug Fixes:
Published by wwkimball over 4 years ago
Bug Fixes:
Published by wwkimball over 4 years ago
Bug Fixes:
Published by wwkimball over 4 years ago
Bug Fixes:
Published by wwkimball over 4 years ago
Bug Fixes:
Enhancements:
Published by wwkimball over 4 years ago
2.3.2:
Bug Fixes:
Published by wwkimball over 4 years ago
2.3.1:
Bug Fixes:
API COMPATIBILITY WARNING:
Previous versions of the library returned only selected data nodes. Now,
instead of data nodes, NodeCoords objects are returned. This is necessary in
order to resolve Issue #44, which was caused by Python over-aggressively
optimizing memory, making non-String data nodes references to any other node
with the same value. This made changing exactly one of those data nodes
impossible because all nodes with the same original value would change with it.
Now, the NodeCoords class carries DOM tracking data along with each data
node making precise node changes possible. However, your queries will now
return this more complex additional data. In order to evaluate just the data,
please refer to this before-and-after example:
BEFORE:
for node in processor.get_values(yaml_path):
do_something_with(node)
AFTER:
for node_coordinate in processor.get_values(yaml_path):
do_something_with(node_coordinate.node)
If you need to recursively remove DOM tracking data from the results, a new
utility function is available: func.unwrap_node_coords(data). Note however
that you need that tracking data in order to change data within the DOM.
This does not affect the output of the sample command-line utilities.
Published by wwkimball about 5 years ago
2.3.0:
Bug Fixes:
Enhancements:
Published by wwkimball over 5 years ago
2.2.0:
Bug Fixes:
Enhancements:
Published by wwkimball over 5 years ago
Bug Fixes:
Published by wwkimball over 5 years ago
Enhancements:
Published by wwkimball over 5 years ago
Bug Fixes:
Enhancements:
Published by wwkimball over 5 years ago
Bug Fixes:
Published by wwkimball over 5 years ago
Enhancements:
Bug Fixes:
Published by wwkimball over 5 years ago
Bug Fixes: