Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wdbm/megaparsex
parsing and associated utilities
https://github.com/wdbm/megaparsex
ip metar parsing parsing-functions parsing-library python taf weather
Last synced: 27 days ago
JSON representation
parsing and associated utilities
- Host: GitHub
- URL: https://github.com/wdbm/megaparsex
- Owner: wdbm
- License: gpl-3.0
- Created: 2017-09-22T14:31:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-12T23:34:07.000Z (almost 7 years ago)
- Last Synced: 2024-10-04T22:16:53.789Z (3 months ago)
- Topics: ip, metar, parsing, parsing-functions, parsing-library, python, taf, weather
- Language: Python
- Size: 1.11 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](https://raw.githubusercontent.com/wdbm/megaparsex/master/media/megaparsex.png)
# credits
- name by Liam Moore
# introduction
`megaparsex` is a Python module that features parsing and associated utilities. It features parsing functions that detect keyphrases in input text and that then return text, seek confirmations and run functions in response. It features functions that accept a list of parsing functions so that collections of parsing functions can be combined and new parsing functions can be added easily.
It features a confirmation class that contains the ability to check responses for confirmation or denial while containing a function with optional keyword arguments to run on detection of confirmation together with optional specialized prompts and responses to confirmation and denial. It features a command class that contains the ability to request an input that is to be run as a command and to run that command, and contains a prompt.
Some associated utilities are functions for manual input, to run system commands, to report IP information, to report weather information, to report system status, to restart a script, and to make a reverse-SSH connection.
See example code for basic usage information.
# setup
```Bash
sudo pip install megaparsex
```# coding ideas
The multiparse function can combine a number of predefined or custom parser functions. Simple interactions involve responding to a single text input with text or by running a function. More complex interactions involve responding to a single text input but with a confirmation object which is used to ask for a confirmation before proceeding with defined actions. Still more complex interactions could involve nested parsers, whereby a parser or set of parsers is used to extract a response and that response can be used to propagate to nested parsers.