1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2026-04-03 17:44:07 +02:00
Commit Graph

812 Commits

Author SHA1 Message Date
Kelly Brazil
41e2e16436 Merge branch 'dev' into fix/dir-lstrip-drive-letter 2026-03-30 11:46:32 -07:00
Kelly Brazil
0d703cd3a8 Merge branch 'dev' into fix/ifconfig-lstrip-hex-mask 2026-03-30 11:41:36 -07:00
Kelly Brazil
ecc267b3cb Merge branch 'dev' into fix/pip-show-files-section 2026-03-30 11:20:09 -07:00
ReinerBRO
9fe659d625 Handle pip show files sections 2026-03-26 14:14:11 +08:00
Alex Towell
128e36404d Fix dir parser stripping D: drive letter from parent directory path
lstrip(" Directory of ") strips any character in the set
{' ','D','i','r','e','c','t','o','y','f'}, which incorrectly removes
the 'D' from D:\ paths. Use fixed-length prefix removal with [len():]
instead.

Fixes #687

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 03:14:43 -05:00
Alex Towell
2f9377cb67 Fix ifconfig hex mask conversion using lstrip('0x') instead of [2:]
lstrip('0x') strips any character in {'0','x'} from the left, not the
literal prefix "0x". This causes incorrect mask conversion for masks
with leading zero hex digits (e.g. 0x00000000 -> empty string instead
of 0.0.0.0).

Replace lstrip('0x') with [2:] to correctly remove only the '0x'
prefix. Fixes both the legacy ipv4_mask field and the ipv4[] list.

Fixes #685

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 03:12:34 -05:00
Kelly Brazil
47545833ed Merge branch 'dev' into haslib_mode 2026-03-16 12:05:52 -07:00
Kelly Brazil
7f2722ff96 remove int_value field and add tests 2026-03-13 15:16:54 -07:00
Kelly Brazil
e01287b329 add stats fields to json output. #676 2026-03-09 17:35:33 -07:00
Kelly Brazil
936432d879 Fix parsing blank targe in verbose output #675 2026-03-06 12:59:16 -08:00
Kelly Brazil
f3352352ed fix unknown flags throwing key error (#681) 2026-02-27 12:08:08 -08:00
Ivan Pozdeev
4067bfed9f Support friendly names for modes; rename files and tests to indicate non-default modes 2025-12-16 02:43:16 +03:00
Ivan Pozdeev
04303efa75 Fix tests 2025-12-16 01:28:18 +03:00
Ivan Pozdeev
956f74358b Add tests for other mode indicators 2025-12-15 23:42:13 +03:00
Ivan Pozdeev
1944a7145e Fix erroneous redundant find&replace 2025-12-11 07:23:53 +03:00
Ivan Pozdeev
ecd0e03c66 Parse the mode indicator in *sum output
In accordance with shasum(1) manpage
For legacy md5, set it to blank
2025-12-11 07:01:26 +03:00
Kelly Brazil
d270ddc6ce fixup traceroute and traceroute-s parsers 2025-10-12 17:58:37 -07:00
Shintaro Kojima
07ef285b06 Add traceroute streaming parser - traceroute-s (#669)
* test: split out test fixtures for long ipv6 traceroute for consistency

* refactor(jc/parsers/traceroute): remove duplicate ParseError class

* refactor(jc/parsers/traceroute): pre-process data in _loads() for easy-to-reuse

* refactor(jc/parsers/traceroute): split hop serialization into separate function to reuse

* refactor(jc/parsers/traceroute): simplify numeric conversion and make it reusable for traceroute_s

* fix(jc/parsers/traceroute): stricter regex to match traceroute headers only

* feat(jc/parsers/traceroute_s): v1.0 implementation

* fix(jc/parsers/traceroute): revert "_" prefix in function and class names

* fixup! fix(jc/parsers/traceroute): revert "_" prefix in function and class names

* chore(jc/parsers/traceroute): update the author information
2025-10-12 10:21:16 -07:00
Kelly Brazil
467ad60e20 Fix for who output containing process name #663 2025-09-08 17:14:37 -07:00
Kelly Brazil
61793bba31 fix net_localgroup tests 2025-09-08 14:54:45 -07:00
Kelly Brazil
51e4a476ba fixup net_localgroup parser 2025-09-08 14:44:13 -07:00
Kelly Brazil
883f0c9cf7 net-user parser fixup 2025-09-08 14:25:44 -07:00
Kelly Brazil
b520532578 fixup route-print parser 2025-09-04 16:43:18 -07:00
Jose E. Rodriguez
3b1af1a9b6 Feat: Introduce net-localgroup net-user and route-print parsers (#602)
* feat(patch): introduce net localgroup, net user, and route print parsers

* fix: fix net user parsing error

* fix: address PR findings

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2025-09-04 14:47:28 -07:00
Kelly Brazil
0fa5f7f67f add test 2025-08-03 17:19:21 -07:00
Kelly Brazil
6e49c87575 update tests 2025-07-24 13:02:37 -07:00
Kelly Brazil
5db256c3e7 add x509-crl parser tests 2025-06-06 15:23:42 -07:00
Kelly Brazil
bebd6a60fb add team-port.config and fix for blank values 2025-05-18 19:24:54 -07:00
Kelly Brazil
7c9e92e284 add test for team.config with JSON 2025-05-05 14:48:12 -07:00
Kelly Brazil
966df71566 add default policy stats to iptables parser 2025-04-15 08:41:30 -07:00
Kelly Brazil
9b4190f1e6 fix mount on macOS when filesystem contains parenthesis 2025-04-13 18:13:31 -07:00
Kelly Brazil
c519657d85 allow IDNA2008 encoded email addresses with warning 2025-04-12 10:50:26 -07:00
Kelly Brazil
d5cceb77e9 remove extraneous file 2025-04-04 16:16:47 -07:00
Kelly Brazil
5cde110afb set bytes conversion to posix mode 2025-04-04 16:14:20 -07:00
Jake Ob
ebbd4e9320 Fix broken controller parser schema to include power state prop (#652)
This commit fixes issue #627

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2025-04-02 11:32:19 -07:00
Kelly Brazil
834acfb2d6 update lsblk tests 2025-03-31 17:06:41 -07:00
Kelly Brazil
1182c9f263 fix for missing dB value 2025-03-31 16:50:46 -07:00
Kelly Brazil
ed3046bb1b remove type annotations since they are not used 2025-03-31 16:34:38 -07:00
Kelly Brazil
1c09289d95 fix time parser for missing centiseconds 2025-03-31 12:16:45 -07:00
Kelly Brazil
7fda79d841 allow parser to deal with null input 2024-12-20 16:31:38 -08:00
Eden Refael
a39cb05228 created the amixer sget command parser - READY FOR REVIEW (#616)
* created the amixer first skeleton

* push testing and integrate this commit and branch with issue: #591

* #591 checks the input data with jc utils

* created the data parser of the sget control of the amixer sget <controller> command.

* test commit - just for tests

* another test commit

* another test commit

* created a dedicated pseudo algorithm for the amixer sget and tried various of strings.

* orginized the docstring with general explanation about the tool and the amixer tool output and algorithm of the input parsing and input examples.

* created raw implementation, but it's raw either or either.

* orginized the content inside the amixer parser

* removed endpoint name

* added amixer to the jc parser in lib

* more explanations

* added tests for the amixer sget

* added tests for the amixer sget

* fine versioning fix

* created docstring+another explanations seperated.

* created the amixer parser docu

* added the amixer in alphabet order to the json convert lib

* Fix PEP 8: E302 violation as part of boy scout principle

* deleted not necessary file

* fixed the spaces between sections in the amixer description

* resolved commits such as amixer module docstring and preperations for  parser for raw=False.

* Revert "Fix PEP 8: E302 violation as part of boy scout principle"

This reverts commit 241d1a1c63.

* created the dedicated _process for raw=False

* created the dedicated _process for raw=False

* added tests for the _process raw=False.

* changed keys to be lowercase snake-case - Change 'dB' to 'db'

* added more dB -> db changes and used int convertor of the jc utils

---------

Co-authored-by: EdenRafael <eden.refael@kazuar.com>
Co-authored-by: Eden Refael <edeenraf@hotmail.com>
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-12-20 15:06:38 -08:00
Kelly Brazil
a2b5d41308 minor fix to iw-scan to parse more fields 2024-11-25 20:19:40 -08:00
Kelly Brazil
366589268e update calculated fields 2024-11-25 17:16:30 -08:00
Kelly Brazil
53dd28b65e doc update 2024-11-24 18:59:30 -08:00
Kelly Brazil
0be6528aff convert size fields and fix issue for optional_deps without a description 2024-11-24 18:13:08 -08:00
Kelly Brazil
6ae2e17ea1 add examples and tests 2024-11-24 17:30:03 -08:00
Hamza Saht
7fbe1e9f21 Add WireGuard (wg) Command Output Parser (#606)
* feat: add parser to parse the output of wg

* fixup! feat: add parser to parse the output of wg

* feat: Add tests for windows 10

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-11-24 13:34:58 -08:00
Kelly Brazil
7ddd2a4ce2 fix yaml parser to support values starting with an equal sign 2024-11-19 14:12:21 -08:00
pettai
a8b231da81 nsd-control parser update, zone transfer status (#607)
* add more parsing functionality for transfering state

* add additional/conditional fields into the schema

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-11-19 12:12:43 -08:00
Kelly Brazil
4cb88977cc add long ipv6 test 2024-11-19 10:51:10 -08:00