Jump to content

uncalin

Member
  • Posts

    3
  • Joined

  • Last visited

Everything posted by uncalin

  1. Hi everyone. Context: I am writing a workflow based on a Script Filter, but for external reasons the results come pretty slowly and one by one. As far as I'm aware it's impossible to stream results directly with the script filter object. So, what I wanted to do, is to fetch the results asynchronously, write them in a file, and have the Script Filter just look at the file. Using the rerun option to 'refresh' results regularly I could make it work. So my question is: How to asynchronously run scripts in a workflow? Just launching the script but not waiting for it to end before continuing the workflow. It could be a python or bash script, it could be called by a 'Run Script' object or directly in the script filter; it doesn't really matter. I've tried the two following things that I thought would work, but Alfred still waits for the other script to finish before continuing. import subprocess subprocess.Popen(["./other-script.sh"]) #!/bin/bash ./other-script.sh & echo -n "continue" Thanks a lot, Leo
  2. Sorry for the late reply, busy week. Thanks man, I'll check this out. Any technical reason why this is not included in the alfred-workflow library ? I mean other than lack of time, or lack of requests to integrate it (I might consider contributing, so this could be start if I get something nice to work for my personnal workflow)
  3. Hi guys, I've just set up my first python workflow using the alfred-workflow lib and its superb tutorial. I am fetching results from an api and showing them using wf.add_item, but for each api result I get a link to an image, and I would like to use this as the result icon. From what I understand from the lib documentation it is not directly possible using the icon parameter. Do you know if there is some way to do that ? I guess I could try to download the file from python and referencing it locally ? But I haven't really thought about it yet and this already raises some concerns to me haha, seems hacky Thanks for your help !
×
×
  • Create New...