Comments (9)
Sounds good - reopening this issue and I'll close when the next version is released.
from jc.
distro: Arch
Name : jc
Version : 1.24.0-1
Description : Converts the output of popular command-line tools and file-types to JSON
Architecture : any
URL : https://github.com/kellyjonbrazil/jc
Licenses : MIT
Groups : None
Provides : None
Depends On : python python-pygments python-ruamel-yaml python-xmltodict
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 8.30 MiB
Packager : George Rawlinson <[email protected]>
Build Date : Thu 28 Dec 2023 11:31:34 AM +06
Install Date : Mon 01 Jan 2024 03:51:46 PM +06
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
iwconfig installed with wireless_tools
Name : wireless_tools
Version : 30.pre9-3
Description : Tools allowing to manipulate the Wireless Extensions
Architecture : x86_64
URL : https://hewlettpackard.github.io/wireless-tools/Tools.html
Licenses : GPL
Groups : None
Provides : None
Depends On : None
Optional Deps : None
Required By : conky
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 352.27 KiB
Packager : Evangelos Foutras <[email protected]>
Build Date : Wed 13 Nov 2019 10:13:01 PM +06
Install Date : Mon 13 Mar 2023 09:57:11 AM +06
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
from jc.
Hi - thanks for reporting this. Could you copy/paste the iwconfig
output in a code block here? Something like this:
$ iwconfig > iwconfig.out
$ cat iwconfig.out
...
from jc.
from jc.
It's likely the parser trips up due to the ESSID string containing the caret (^
) character:
$ cat orig.txt
wlp0s20f3 IEEE 802.11 ESSID:"Sacharidy"
Mode:Managed Frequency:5.22 GHz Access Point: E6:63:DA:A8:E4:91
Bit Rate=270 Mb/s Tx-Power=22 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=38/70 Signal level=-72 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:4143 Missed beacon:0
$ cat orig.txt | jc --iwconfig
[{"name":"wlp0s20f3","protocol":"IEEE 802.11","essid":"Sacharidy","mode":"Managed","frequency":5.22,"frequency_unit":"GHz","access_point":"E6:63:DA:A8:E4:91","bit_rate":270.0,"bit_rate_unit":"Mb/s","tx_power":22,"tx_power_unit":"dBm","retry_short_limit":7,"rts_threshold":false,"fragment_threshold":false,"power_management":true,"link_quality":"38/70","signal_level":-72,"signal_level_unit":"dBm","rx_invalid_nwid":0,"rx_invalid_crypt":0,"rx_invalid_frag":0,"tx_excessive_retries":0,"invalid_misc":4143,"missed_beacon":0}]
$ cat broken.txt
wlp0s20f3 IEEE 802.11 ESSID:"^_^"
Mode:Managed Frequency:5.22 GHz Access Point: E6:63:DA:A8:E4:91
Bit Rate=270 Mb/s Tx-Power=22 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=38/70 Signal level=-72 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:4143 Missed beacon:0
$ cat broken.txt | jc --iwconfig
[]
(running jc 1.25.1)
from jc.
thank, it work
sry for bothering
I'll wait for 1.25.x
build for Arch
upd: I'm sorry, I didn't read your message correctly and hurriedly. Why did I think that 1.25.* fixes the problem
from jc.
This is fixed in the dev
branch: https://github.com/kellyjonbrazil/jc/blob/dev/jc/parsers/iwconfig.py
You can test by copying the file above to your jc
parser plugin directory:
- Linux/unix:
$HOME/.local/share/jc/jcparsers
- macOS:
$HOME/Library/Application Support/jc/jcparsers
- Windows:
$LOCALAPPDATA\jc\jc\jcparsers
from jc.
thanks
I don't know much regex but I think it should work fine
Waiting for merge dev to master and bulding package for Arch
from jc.
Added in v1.25.2
from jc.
Related Issues (20)
- New Parser - NUT-upsc command HOT 1
- [parsers /pci_ids.py] Only last [subvendor][subdevice] got loaded into result when multiple subdevices having the same subvendor id HOT 3
- Bug: Traceroute ignored IPs when multiple IPs on hop HOT 3
- "ss" Parser not working correctly: Entries Missing HOT 5
- .netrc support HOT 1
- Problem with --pip-show parser for a module with nothing on the License: line but which has following lines HOT 4
- lspci strips trailing digit on bus ID HOT 3
- `--zpool-status` fails to handle the `spares` section of `zpool status` HOT 3
- New parser request: pacman -Si HOT 9
- 1.25.3: pytest fails in nits which are comparing time HOT 8
- Python 3.12 test regression: `tests.test_ip_address.MyTests.test_ip_address_ipv6_6to4` HOT 11
- Parsing mounts with spaces in filenames fails - AttributeError: 'NoneType' object has no attribute 'groupdict' HOT 2
- New Streaming-parser proposal: traceroute-s HOT 2
- ethtool parsing doesn't work HOT 2
- Netstat issue with spaces in program name HOT 4
- jc ls --time-style=+"%F %T" -al -> wrong output HOT 1
- New Parser: cloudformation template.yaml HOT 4
- ifconfig parser of IPv4 do not support utun interfaces on macOS HOT 2
- Python 3.13 test failure: `test_ip_address_ipv6_ipv4_mapped` HOT 6
- uptime parser with 0 user(s) on ubuntu 24.04 docker not matching HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jc.