Search YAML files satisfying specified conditions.
Project description
Search YAML files satisfying specified conditions.
Depends on Python 3.
Examples: yfind '.mailings[0].sent < 2012/06/12' my_files/
yfind '.id == 10'
((?.id) and (yfind '.id == 10)) or (.enabled == "False")'
Currently supported search expressions:
<Operand> <Operator> <Operand>
where Operator is one of ==, !=, <, >, <= or >=.
Operands may be numbers (1, 3.0), scalars (“foo”, “bar”), dates (2007/12/30) or YAML fields (.foo.bar, .foo[4].bar, .bar).
To check for existance of a field, use ‘?’ before the field name: ?.foo.bar.
Search expression can be combined with the logical operators “and, or, not”:
not (<SearchExpression>)
(<SearchExpression>) and (<SearchExpression>)
(<SearchExpression>) or (<SearchExpression>)
History
0.1.0a2 - 2012/08/21
Added boolean operations (and, or, not)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file yfind-0.1.0a2.tar.gz
.
File metadata
- Download URL: yfind-0.1.0a2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c506bb56eb6919ee76aa1aec20443557ecb4af0dc29756a9f96e1d3c8c045d8 |
|
MD5 | 636380564d57388b573a47faf6c4e7de |
|
BLAKE2b-256 | f481bc9c278abcf7e7ec6a5d38df3536079069bfc4a9cbb1c11f40deff6a3e3d |