Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wishlist] Ability to get a set of values in a result #108

Closed
victorromeo opened this issue Mar 20, 2020 · 2 comments
Closed

[wishlist] Ability to get a set of values in a result #108

victorromeo opened this issue Mar 20, 2020 · 2 comments

Comments

@victorromeo
Copy link

As an extension to #13 can I request inbuilt support for returning a collection of 'n' elements?

When I'm parsing the output of sudo iwlist wlan0 scan I get variable length responses, which require additional plumbing.

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
...
                        Pairwise Ciphers (2) : TKIP CCMP
and
                        Pairwise Ciphers (1) : CCMP

I know this is special case, but lists of values in strings are not unusual. May I get a wishlist item?

@jenisys
Copy link
Contributor

jenisys commented Mar 22, 2020

ALREADY SOLVED:
parse_type allows to specify a type that contains 0..N or 1..N items.
This type can then be used/registered in a parse parser.

SEE:

@victorromeo
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants