Skip to content

A way to insert shell command output as the result? #4

Description

@alesya-h

Hi. This plugin is great, but it would be awesome to have a second command that'd insert the stdout as a translation of the stroke. I tried adding

import subprocess

def shell_cmd_out(_: 'plover.engine.StenoEngine', command: str):
    '''
    Command to execute a shell command.
    :param _: The Plover engine that is executing the command.
    :param command: The command to execute.
    '''
    return(subprocess.check_output(command,shell=True,text=True))

and adding shell_out = plover_run_shell:shell_cmd_out to entry_points.txt, but that doesn't seem to work. I'm new to both Plover and Python, so I'm not sure I can figure it out on my own. It'd be great if you can help with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions