forked from mirrors/thatmattlove-hyperglass
Remove old parser
This commit is contained in:
parent
99565da0f9
commit
9a57e4a728
1 changed files with 0 additions and 17 deletions
|
|
@ -1,17 +0,0 @@
|
|||
"""Command parsers applied to all unstructured output."""
|
||||
|
||||
|
||||
def remove_command(commands: str, output: str) -> str:
|
||||
"""Remove anything before the command if found in output."""
|
||||
_output = output.strip().split("\n")
|
||||
|
||||
for command in commands:
|
||||
for line in _output:
|
||||
if command in line:
|
||||
idx = _output.index(line) + 1
|
||||
_output = _output[idx:]
|
||||
|
||||
return "\n".join(_output)
|
||||
|
||||
|
||||
parsers = (remove_command,)
|
||||
Loading…
Add table
Reference in a new issue