1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00
Commit Graph

3676 Commits

Author SHA1 Message Date
539fe72d16 add "sudo efibootmgr" (without -v) output test case (#534) 2024-02-06 01:54:31 +00:00
bd6611aaba doc updates 2024-02-06 01:54:31 +00:00
cf77ddc396 cleanup 2024-02-06 01:54:31 +00:00
77bcd616cd add tests for curl-head and http-headers parsers 2024-02-06 01:54:31 +00:00
5ee2eda83e add efibootmgr parser (#528)
* 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>
2024-02-06 01:54:31 +00:00
5b849b0275 doc update 2024-02-06 01:54:31 +00:00
3e5d206f0c test utils cleanup 2024-02-06 01:54:31 +00:00
f50f96381d doc update 2024-02-06 01:54:31 +00:00
962632ac1f Feature: generic fixtures tests (#529)
* add generic test runners

* extract generic test runners

* beautify messages, remove unused return value

* add template and info do CONTRIBUTING

* typo

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-02-06 01:54:31 +00:00
d209780a9d only add timestamp field if datetime string is parsable 2024-02-06 01:54:31 +00:00
8e5451a7c1 fix for datetime or integer fields 2024-02-06 01:54:31 +00:00
86a09c17cf remove unused _process function 2024-02-06 01:54:31 +00:00
4bb85195e2 doc update 2024-02-06 01:54:31 +00:00
39f43aad63 add http_headers and curl_head parsers 2024-02-06 01:54:31 +00:00
29689f7603 formatting 2024-02-06 01:54:31 +00:00
78d7ab1308 add info about documentation and completions (#531) 2024-02-06 01:54:31 +00:00
303cd12de3 version bump to v1.25.0 2024-02-06 01:54:31 +00:00
b65f37e075 add normalize_key() function and tests 2024-02-06 01:54:31 +00:00
c05fa7e9cd add remove_quotes() to utils and use in ini parsers 2024-02-06 01:54:31 +00:00
264272a8b8 doc update 2024-02-06 01:54:31 +00:00
7fadb23fea use convert_size_to_int() 2024-02-06 01:54:31 +00:00
c419e460db doc update 2024-02-06 01:54:31 +00:00
6434ff61bf add HTTP header datetime format 2024-02-06 01:54:31 +00:00
45a1be11e2 doc update 2024-02-06 01:54:31 +00:00
7659fe470a formatting 2024-02-06 01:54:31 +00:00
c332c4febf draft for path and path_list (#513)
* 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>
2024-02-06 01:54:31 +00:00
2cc212bfab use convert_size_to_int() from utils 2024-02-06 01:54:31 +00:00
b836ffc583 add tests for convert_size_to_int() 2024-02-06 01:54:31 +00:00
29f1a1d425 fix proc doc - output is dict or list of dicts 2024-02-06 01:54:31 +00:00
9f78dc6afa proc parser doc update 2024-02-06 01:54:31 +00:00
74c7e11948 doc update 2024-02-06 01:54:31 +00:00
6ba6dc0374 version bump 2024-02-06 01:54:31 +00:00
ec0f2569e5 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
2024-02-06 01:54:31 +00:00
65e30c4440 doc update 2024-02-06 01:54:31 +00:00
8d9ebf5dfa doc update 2024-02-06 01:54:31 +00:00
c3746454ff doc update 2024-02-06 01:54:31 +00:00
ea0f6493a2 update contributing guide 2024-02-06 01:54:31 +00:00
afbc46076e add ping tests 2024-02-06 01:54:31 +00:00
2b9b6550a7 Fix data_bytes is null in ping -I option (#520)
* fixed header parsing when specifying ping interface

* add source_ip parsing test for ping/ping-s

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-02-06 01:54:31 +00:00
6fb3c0a409 doc update 2024-02-06 01:54:31 +00:00
1b8911ad36 add slurp docs 2024-02-06 01:54:31 +00:00
cc61b57dd1 add blank line tests to slicer 2024-02-06 01:54:31 +00:00
6d679b2895 doc update 2024-02-06 01:54:31 +00:00
1e1fc08a47 doc update 2024-02-06 01:54:31 +00:00
b5c3a03d56 implement slurp by wrapping in a list, adding "_file" for /proc, and further wrapping in {"result": data} when --meta-out is used. 2024-02-06 01:54:31 +00:00
9e269f070f update slice help doc 2024-02-06 01:54:31 +00:00
f863cfdef4 fix for slicing blank lines 2024-02-06 01:54:31 +00:00
2cd58d75e7 make parser_shortname more robust 2024-02-06 01:54:31 +00:00
03b70eebb7 make /proc slurpable with magic syntax 2024-02-06 01:54:31 +00:00
1e76ce2aea doc update 2024-02-06 01:54:31 +00:00