* fix: enforce word boundaries while checking state presence
* fix: add tests for the special netstat case with space in process name
---------
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
* feat: Introduce ipconfig parser
* fix: add parsing support for "connection_specific_dns_suffix_search_list" and windows XP ipv4 addresses, remove dateutil dependency
* fix: introduce unit tests, correct import of datetime
* fix: changed preferred to status to account for other ip statuses, and parsed link local ipv6 prefix length
* fix: compress _parse_header_line and _parse_adapter_line + fix casing in unit test file
---------
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
This commit fixes the controller parser scheme in order to take care
and extract some extra attributes, the manufacturer and version.
The order of the attributes appearing in the regexp scheme must follow
the order they appear in the `bluetoothctl show` outputs.
A new test has been added to test outputs with these extra attrs.
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
* [xrandr] Allow props command
Responding to issue #525
Somewhat substantial rewriting here to make the parser more resilient
- Change parser to not mutate the incoming data list, instead index
- Create `Line` class and `categorize` classmethod
- Every line is categorized and regexed, so it gets dispatched to the
right level of responsibility
* Bump version
---------
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
* More nsd fixes (#523)
* Update nsd_control.py
support catz output
* Update nsd_control.py
fix parsing of catz zones
* add testdata
add corresponding catz testdata
* Revert "More nsd fixes" (#526)
* add efibootmgr parser
* add efibootmgr completions
* Multiple fixes on jc/parsers/efibootmgr.py
1. Update schema in comments.
1. Add an example.
1. Use clean and clear sub string finding sytax.
1. Wrap schema in an object.
1. Make variable scope as small as possible.
* add tests for efibootmgr
* Update jc/parsers/efibootmgr.py
Update example using `--pretty` for output.
Co-authored-by: Muescha <184316+muescha@users.noreply.github.com>
* jc/parsers/efibootmgr multiple changes
1. convert all keys to "snake_case"
2. add "mirrored_percentage_above_4g" and "mirror_memory_below_4gb"
3. move conversion (from string to other types) to "_process"
---------
Co-authored-by: pettai <pettai@sunet.se>
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
Co-authored-by: Muescha <184316+muescha@users.noreply.github.com>
* draft for path_list
* updaate doc
* add input check
* fix types
* fix schema: add missing properties
* add _process
* fix _process docs
* refactor: extract path.py parser
* swap order of names alphabetically
* documentation and comments
* path parser: add early return for nodata
* path and path-list parser: add test and fixtures
* typo in file name
* add early return for nodata
* add test and fixtures
* typo in file name
* rename fixtures
* rename fixtures
* refactor to pathlib.Path
* failing on windows - use PurePosixPath
* changed the way to strip dot from suffix
* add POSIX to path
* test commit to see results on windows is failing
* test commit to see results on windows is failing
* add windows path detection
* somehow Path not like the newline from input line
* add test with more items
* remove debug print
* wrap test loops into into subTest
* remove print statements
* add path and path-list to CHANGELOG
---------
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
* fixed header parsing when specifying ping interface
* add source_ip parsing test for ping/ping-s
---------
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
* feat(iftop): add iftop-scanning
this is not even an MVP, but I would like it to exist to allow per client json aggregation
also, a future use is a stream response
* fix typos and test first regex
* add more iftop fun
* Update iftop.py
* add tests and json
Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>
* feat: make work and add tests
Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>
* add completion
* change schema for query looping
* fix: tests
* fix review comments
* feat: add byte parsing
* add no-port to options
* remove completion and format dep
Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>
* Update setup.py
* Update iftop.py
---------
Signed-off-by: Ron Green <11993626+georgettica@users.noreply.github.com>
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>