With this you can now add python code to run on custom keyboard shortcuts to parse the terminal output and speak it in a more useful way.
There is a small efficiency boost by configuring the command you ran previous to pressing the shortcut and stop parsing the terminal output when found. This isn't necessary but reduces how much output a plugin gets passed which makes it faster and slightly safer (as it should stop it receiving any sensitive output).
An example use case is the pytest output, instead of all the irrelevant stuff from pytest you could now pull out the test count, the error message and the line of code that triggered it e.g. "1 failed, 5 passed, AttributeError: 'NoneType' object has no attribute 'group', code is results = parse_output(lines)"
I've pushed a plugin repo to show how you could share plugins. Cloning that repo into plugins/ and then configuring with the right folder/file names works with this branch :smile:
With this you can now add python code to run on custom keyboard shortcuts to parse the terminal output and speak it in a more useful way. There is a small efficiency boost by configuring the command you ran previous to pressing the shortcut and stop parsing the terminal output when found. This isn't necessary but reduces how much output a plugin gets passed which makes it faster and slightly safer (as it should stop it receiving any sensitive output).
An example use case is the pytest output, instead of all the irrelevant stuff from pytest you could now pull out the test count, the error message and the line of code that triggered it e.g. "1 failed, 5 passed, AttributeError: 'NoneType' object has no attribute 'group', code is results = parse_output(lines)"
Implements https://github.com/tspivey/tdsr/issues/33
I've pushed a plugin repo to show how you could share plugins. Cloning that repo into plugins/ and then configuring with the right folder/file names works with this branch :smile: