pip install yaml-pipe
--dotindex
: extract only.--dotlist
: edit only.-f, --file
: edit only.
---
aaa:
bbb: bbb
cat sample.yml | yaml-pipe --dotindex "aaa.bbb"
output
bbb
---
aaa:
bbb: bbb
---
xxx:
yyy: yyy
cat sample.yml | yaml-pipe --block_id 1 --dotindex "xxx.yyy"
output
yyy
---
xxx:
yyy:
zzz: zzz
cat sample.yml | yaml-pipe --block_id 1 --dotindex "xxx"
output
yyy:
zzz: zzz
sample.yml
---
foo:
bar: BAR
cat sample.yml | yaml-pipe --dotlist foo.bar="bar"
output
---
foo:
bar: bar
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
sample.yml
---
foo:
bar: BAR
---
fizz:
buzz: BUZZ
update.yml
fizz:
buzz: buzz
cat sample.yml | yaml-pipe --block_id 1 --file update.yml
output
---
foo:
bar: BAR
---
fizz:
buzz: buzz
pyenv local 3.10.4 3.9.13 3.8.13
poetry install
poetry run nox
./test_cli.sh
Default target is testpypi.
make pypi-upload
If you upload to pypi, set empty to TEST_PYPI
.
make pypi-upload TEST_PYPI=