1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-10-08 23:22:21 +02:00
Commit Graph

540 Commits

Author SHA1 Message Date
Kelly Brazil
467ad60e20 Fix for who output containing process name #663 2025-09-08 17:14:37 -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
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
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
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
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
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
Hamza Saht
fa416083f2 Fix/spaces in program name (#608)
* 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>
2024-11-19 10:28:32 -08:00
Kelly Brazil
e858faa746 fix for contiguous packages with the same name 2024-11-18 16:21:40 -08:00
Kelly Brazil
26133261f9 use jc.utils.timestamp() for datetime conversions 2024-10-20 09:45:08 -07:00
Jose E. Rodriguez
a2e0e6d549 feat: Add Windows ipconfig parser to jc (#596)
* 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>
2024-10-18 14:17:14 -07:00
Jake Ob
c5e0642b0b Fix broken controller regexp scheme in the bluetoothctl parser (#599)
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>
2024-10-18 09:50:51 -07:00
Kelly Brazil
f2a8e0087b add tests and doc update 2024-09-22 20:01:40 -07:00
Leonard Crestez
413519e02c #592: Handle df size suffixes as binary (#593)
* df: convert_size_to_int as binary

* tests: Update df -h expected output

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-09-22 19:28:45 -07:00
Mabuchin
1593d0bf79 Add error type support for Linux Ping (#575)
* feat: add icmp error handle into linux_parse

* refactor: fixed timestamp offset logic(including error-response-type condition)
2024-09-07 19:46:43 -07:00
Kelly Brazil
8a22f8a468 add support for Link partner advertised link modes to ethtool parser 2024-09-07 18:43:41 -07:00
Kelly Brazil
c68c919024 add mount test 2024-06-18 17:34:17 -07:00
Kelly Brazil
e13605a6a9 add ss tests 2024-06-08 09:17:57 -07:00
Kelly Brazil
f1bab336ee fix file_stats in git-log parsers 2024-05-14 17:38:39 -07:00
Kelly Brazil
517137889c fix zpool-status parser when there are no columnar values 2024-05-10 11:06:05 -07:00
Kelly Brazil
8a3997cd0e fix for pip-show parser with multi-line fields starting with a blank line 2024-05-02 15:09:06 -07:00
Kelly Brazil
4f66faad0d do not convert physlot to int 2024-04-29 14:20:15 -07:00
Kelly Brazil
5bec53b3f8 feat: get correct probe IP when mutliple probe on hop (#562)
Co-authored-by: Pierre-Olivier Côté <pierre-olivier.cote@polymtl.ca>
2024-04-29 13:58:11 -07:00
Sam SIU
e2b2406931 [Fix issue #558] Add a condition check before subvendor dict creation (#559)
- Updated jc/parsers/pci_ids.py adding a check to see if the subvendor dict is already created
- Updated test fixture

Signed-off-by: Sam SIU <23556929+ssiuhk@users.noreply.github.com>
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-04-28 12:58:22 -07:00
Nicolas Mattelaer
4ef34f7849 feat: Add battery_percentage property to --bluetoothctl output (#564)
* Adds battery_percentage property to bluetoothctl output

* remove ending comma

---------

Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
2024-04-28 11:27:31 -07:00
Kelly Brazil
1da080dc52 fix for unhandled lines in xrandr output 2024-03-23 10:57:46 -07:00
Kelly Brazil
36de08a6f8 change existing_src to existing_pkg_ver 2024-03-13 19:01:09 -07:00
Kelly Brazil
83fa32f615 ethtool - convert units 2024-03-08 16:39:23 -08:00
Kelly Brazil
5ac36befe2 add apt-get-sqq parser tests 2024-03-01 14:25:33 -08:00
Kelly Brazil
abbd4820fd add ethtool parser tests 2024-03-01 13:52:45 -08:00
Kelly Brazil
7a377f7b8d add needrestart command parser 2024-02-28 13:28:03 -08:00
Kelly Brazil
f9bf889654 add apt_cache_show tests and fix parser name in warning messeages for parser aliases 2024-02-26 20:18:57 -08:00
Kelly Brazil
026846650a add apt_cache_show parser. Split list values into an array. fix tests. 2024-02-26 19:56:07 -08:00
Kelly Brazil
850917ada0 remove extra fields from df parser. All size values are now normalized to bytes. Size field is now an integer. 2024-02-26 11:17:42 -08:00
Kelly Brazil
bce4eb536a add human readable output support to the free parser 2024-02-26 10:42:26 -08:00
Kelly Brazil
ef2a2121b5 add human-readable support to the df parser 2024-02-26 10:00:42 -08:00
Kevin Lyter
d50bd96ce6 [xrandr] Allow props command (#540)
* [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>
2024-02-12 09:03:25 -08:00