Parse yaml
Project description
yaml-pipe
Install
pip install yaml-pipe
How to use
--dotindex
: extract only now.--dotlist
: edit only now.
Extract Example 1
---
aaa:
bbb: bbb
cat sample.yml | yaml-pipe --dotindex "aaa.bbb"
output
bbb
Extract Example 2
---
aaa:
bbb: bbb
---
xxx:
yyy: yyy
cat sample.yml | yaml-pipe --block_id 1 --dotindex "xxx.yyy"
output
yyy
Extract Example 3
---
xxx:
yyy:
zzz: zzz
cat sample.yml | yaml-pipe --block_id 1 --dotindex "xxx"
output
yyy:
zzz: zzz
Edit Example 1
sample.yml
---
foo:
bar: BAR
cat sample.yml | yaml-pipe --dotlist foo.bar="bar"
output
---
foo:
bar: bar
Edit Example 2
sample.yml
---
foo:
bar: BAR
---
fizz:
buzz: BUZZ
cat sample.yml | yaml-pipe --block_id 1 --dotlist fizz.buzz="buzz"
output
---
foo:
bar: BAR
---
fizz:
buzz: buzz
example3
sample.yml
---
foo:
bar: BAR
---
fizz:
buzz: BUZZ
update.yml
fizz:
buzz: buzz
cat sample.yml | yaml-pipe --block_id 1 --dotlist update.yml
output
---
foo:
bar: BAR
---
fizz:
buzz: buzz
Developers
Linting and test
pyenv local 3.10.4 3.9.13 3.8.13
poetry install
poetry run nox
./test_cli.sh
Upload to PyPI
Default target is testpypi.
make pypi-upload
If you upload to pypi, set empty to TEST_PYPI
.
make pypi-upload TEST_PYPI=
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yaml-pipe-1.2.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for yaml_pipe-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a3b556d3a2cba3d8fcf26374f7c6afdc8feb45199be2ab87aafadd901e7340b |
|
MD5 | 5534ed9a236ec02d5998cb0c71fd227f |
|
BLAKE2b-256 | bb632cde80648d3e8bb5985e1df9e2aef60200972ec010f8fcb2cbf1618dfc66 |