tspivey / tdsr

A console screen reader for macOS and Linux
GNU General Public License v3.0
79 stars 19 forks source link

Plugin functionality to customise commands #33

Open hbk619 opened 10 months ago

hbk619 commented 10 months ago

A colleague is using TDSR while learning programming and it's been wonderful so far. Some of the commands he runs give a lot of output e.g pytest so I added a plugin architecture to specify custom shortcuts and parse the output to something nicer. So instead of all the irrelevant stuff from pytest it will 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)"

You can check the diff of my fork, although it has some extra things like condensing symbols.

Is this something you'd be interesting in having? I understand if you want to keep TDSR simple but if you like the idea I can tidy it up a bit and make a PR :)

tspivey commented 10 months ago

I'm interested in this. I can use this to add custom commands to read different parts of the screen.

hbk619 commented 10 months ago

Thanks! Will sort out a PR. I realised the way I've imported the plugins means you can have sub modules in the plugins folder so it's super easy to have plugins from multiple repos, I'll make that clear in the documentation too 😄