News for hackers. Stuff that matters.
Re:Show HN: I automated 1/2 of my typing by UtopiaPunk on Wednesday August 30, 2023 @06:54PM (#37330209)
I use a tool called "Espanso" to accomplish something similar at work. It only runs locally, so no weird data scraping issues to worry about. And it's easy to update as things changes because everything lives in a simple yml file.

https://espanso.org/

It can do simple text replacement, so I have words, phrases, and sentences I use frequently compressed into a few keyboard clicks. It can also grab what is in your clipboard, so that can be incorporated into responses, which is simple but very handy.

A simple text replacement looks like this in the yml file: - trigger: ":espanso" replace: "Hi there!"

But it can even work with a shell, which I think is amazing! For example, I have a particular task at work where I often need to insert a random number into a text document. I can have Espano run PowerShell behind the scenes to run a simple PowerShell command, and that looks something like:

  - trigger: ";rand"
    replace: " {{output}}"
    vars:
      - name: output
        type: shell
        params:
          cmd: "Get-Random -Minimum 100000"
          shell: powershell
Re:Show HN: I automated 1/2 of my typing by karencarits on Wednesday August 30, 2023 @07:20PM (#37330409)
A sidenote, but Espanso can also be set up to communicate with eg chatgpt; you copy some text and type a trigger word such as ":ask" or ":debug" and it makes a request from the trigger and the clipboard and returns the reply from openai https://github.com/rohitna/chatgpt-script
Re:Show HN: I automated 1/2 of my typing by rabbitofdeath on Wednesday August 30, 2023 @10:23PM (#37331755)
WOW! I use Espanso and love it - this will send me off into new rabbitholes!
Re:Show HN: I automated 1/2 of my typing by replwoacause on Thursday August 31, 2023 @12:27AM (#37332463)
I’ve got to plug Snippety on macOS. I’ve configured it to work with my PowerShell scripts, so I can easily call out to OpenAI endpoints and then inline the response into whatever app I’m in. Plus, the dev is super cool and his product is well done. Not associated with it in anyway other than being a happy customer.

https://snippety.app

Re:Show HN: I automated 1/2 of my typing by n8henrie on Wednesday August 30, 2023 @07:08PM (#37330315)
Love espanso, I use it in Mac, Linux, and Windows!

The creator is also incredibly nice, one of those rare open source devs that seems to go out of his way to validate concerns and make PRs truly feel welcome.

Great project.

Re:Show HN: I automated 1/2 of my typing by Xeophon on Wednesday August 30, 2023 @07:01PM (#37330255)
I love espanso. I live it over AHK as it doesn't have some obscure and hard to learn language, so I can just write some python scripts and trigger them with espanso.
Re:Show HN: I automated 1/2 of my typing by eschluntz on Wednesday August 30, 2023 @06:58PM (#37330238)
That is cool! I use Autokey under the hood, but I'll check out Espanso as well