Jump to content

ebarrere

Member
  • Posts

    20
  • Joined

  • Last visited

Posts posted by ebarrere

  1. Just a little constructive feedback, probably too late :)

     

    The banner at the top of the 5.5 upgrade was a little confusing. At first I thought I needed to become a legendary supporter in order to upgrade to 5.5, which sort of rubbed me the wrong way given that I'm already a Mega supporter. After a little looking I found that the upgrade had already occurred and it was just telling me I could become Legendary if I were so inclined...

     

    In any case — keep up the awesome work, I am totally stoked to try the new features (and will definitely consider Legendary status now that I know it's not required :P)

  2.  

     

    Your use of {query} is a bit odd. Why aren't you using the defaults (i.e. "{query}" without Spaces, Brackets and Semicolons escaped)?

     

    I honestly don't remember.  It's probably something I saw somewhere and copied, or maybe I was messing with it while testing?  It's been a while :)

     

    You are recommending double-quotes surrounding {query} and unchecking Spaces, Brackets and Semicolons from both the Script Filter and Run Script setups instead?

     

     

     

    You could try adding echo "{query}" > /dev/stderr to the top of the Script box. That will show up in Alfred's debugger. If you see it, the problem is with your script.

     

    Yeah, I wish I'd thought of this last time it was happening, but I plan to next time I see it :)

     

     

     

    Also, the install instructions in the README are incorrect. You can't run this in terminal

     

    Good point; I wrote that in like 10 minutes last night :)  Thanks for catching it; I've updated to use a HEREDOC instead.

     

     

     

    And, as best I can tell, your Gemfile is incomplete. The workflow also wants something called "color".

     

    Ah, yeah.  That's something I was playing with to control Philips Hue devices.  I don't think there's any code actually in use in there, but I should comment out the "require" for consistency.

  3. Hi there -

     

    I'm not sure this is the right place for this, since I'm not 100% certain it's a bug in Alfred itself (could be the Ruby framework I'm using, but it doesn't seem like it).  Anyway, hopefully someone can point me in the right direction.

     

    I have written a workflow with the Ruby Alfred workflow framework here.  The workflow uses a Script Filter to generate a list of objects from my home automation device, which I can then action to perform commands against.  The problem is that sometimes the workflow doesn't seem to trigger the "Run Script" action.

     

    I've verified this by watching the Alfred workflow debug output:

    [INFO: alfred.workflow.input.scriptfilter] <items><item autocomplete='Stereo - Volume Up 5:' valid='yes'><title>Stereo - Volume Up 5</title><arg>Stereo - Volume Up 5:53078:0:</arg><subtitle>address: 53078</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - Volume Down 5:' valid='yes'><title>Stereo - Volume Down 5</title><arg>Stereo - Volume Down 5:57003:0:</arg><subtitle>address: 57003</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - Power:' valid='yes'><title>Stereo - Power</title><arg>Stereo - Power:37005:0:</arg><subtitle>address: 37005</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - Line In:' valid='yes'><title>Stereo - Line In</title><arg>Stereo - Line In:54836:0:</arg><subtitle>address: 54836</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - KPLU:' valid='yes'><title>Stereo - KPLU</title><arg>Stereo - KPLU:32963:0:</arg><subtitle>address: 32963</subtitle><icon>icon.png</icon></item><item autocomplete='Stereo - KEXP:' valid='yes'><title>Stereo - KEXP</title><arg>Stereo - KEXP:39911:0:</arg><subtitle>address: 39911</subtitle><icon>icon.png</icon></item></items>
    [INFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg 'Stereo - KEXP:39911:0:'

    Note that the last INFO line is "processing output", but there is nothing from the Run Script whatsoever.  I've even added gibberish to the very beginning of my Run Script and it never displays any errors, so it really seems it's just not being run.

     

    Anyone have ideas for what to look at here, or how to enable even more verbose logging from Alfred workflows?

     

    *UPDATE*:  I neglected to mention I'm running the latest Alfred (v2.8 (414)) w/Powerpack on Yosemite 10.10.5

     

    Cheers -

    elliott

  4. Hey guys -

     

    I've "written" a workflow to attach a file to the frontmost email in Mac Mail.  This is really nice if you want to attach a file to an email reply, for instance, rather than creating a new email with the file as an attachment.  (I say "written" because it was actually adapted from an AppleScript I found somewhere on the internet long ago.  Unfortunately it's been so long I honestly can't give credit.)

     

    Anyway, here's the workflow.  You'll need to have an email "open" and ready to send in Mac Mail, with the "focus" on the email body section.  The workflow will jump to the bottom of the email body (below any quoted text) and paste the file to the very end.

  5. Nice! I searched the web when I originally wrote the tool but couldn't find anything, and this was pretty simple to write. I also liked the idea of having a cached copy locally, but ideally my workflow would generate that, and I don't have immediate plans to update it :)

    Your workflow has much more functionality though! I'll switch to it if you add my feature ;)

  6. If you use Jira a lot you might like this workflow.  You can search users by first or last name, and when you find the one you want, action them to paste their username (in [~username] format) to the frontmost application (you can hold Cmd to copy to the clipboard).  Useful if you like to use @mentions in email!

     

    Find the workflow and README (with setup instructions) on GitHub.

  7. Hi there -

     

    I've written a quick workflow to do a few network-related things I do regularly, namely lookup MAC addresses in an online vendor database, and get network information about a subnet.

     

    The repository can be cloned directly from GitHub (please find the README there as well).  Note that the subnet script relies on the ipcalc utility, which can be downloaded here, or through Homebrew.

     

    Hope it helps somebody!

     

    Cheers -

     

    ebarrere

  8. It probably doesn't support .rdp files, unfortunately.  If you can find a way to launch an RDP connection from the command line I can update the script to support it, but that is all I can recommend.

     

    Good luck!

  9. Hey there -

     

    I've used iTap RDP for a while now and have been annoyed with the inability to do a "quick connect" session like CoRD and most other RDP apps.  So I've written a quick little Alfred workflow to open an RDP session from a temp file (I can't believe I didn't think of this before!)

     

    The workflow has been (lightly) tested with both iTap RDP and the newly-released Microsoft Remote Desktop app (free from the App Store), but should work with any other app that can read a .rdp file.

     

    Usage:

    • Type rdp <hostname/IP>[:port] (port defaults to 3389)
    • Enter will open an RDP session to the host using the default system application (can be set using APP variable in script)
    • Provide a "short hostname" (non-FQDN hostname) to auto-append the search suffix from /etc/resolv.conf

     

    screenshot.png

     

    Download direct at GitHub.

     

    Enjoy!

  10. Hi there -

     

    I have a script filter written in ruby (using the very nice Alfred Ruby Template) which queries my home-automation system for a list of devices, or "nodes".  I can then action a node, which passes the address to a script that turns the node on or off.

     

    I would now like to extend this functionality to allow passing a numeric value so the script could, for example, set a light to a specific brightness level, instead of just on or off.

     

    Is this possible with the script filter syntax?  Is there a way to "terminate" the script filter search to say "everything after this point is an argument rather than a search term"?  Perhaps some other way entirely of accomplishing this?  It occurred to me that maybe there's a "context menu" for script filter items, similar to a the File Action menu, but I can't seem to find it.

     

    Cheers for any help!

  11. Aha, got it!  Apparently elinks wasn't in Alfred's PATH variable.  I just added the full path to the elinks executable and it works now.

     

    It looks like Alfred doesn't read my .bash_login file, probably because it's not a login shell :)  Anyway, I can poke around and put the PATH variables elsewhere.

     

    Thanks for helping lead me to the solution!

  12. Thanks for the suggestions.  I've changed the script to look like this:

    IP=$(cut -d " " -f1 <(echo "{query}"))
    NETMASK=$(cut -d " " -f2 <(echo "{query}"))
    RETURN=$(elinks -dump "http://jodies.de/ipcalc?host=${IP}&mask1=${NETMASK}&mask2=" | awk '/^Address:/,/^Hosts/')
    echo ${RETURN}
    

    but nothing has changed.  I've also added {query} to both the "Title" and "Text" sections of the Post Notification action, but still nothing.

  13. Hey all -

     

    I'm trying to pass two arguments to a shell script in Alfred (I've tried both v2 and v1) and I can't seem to get any output.  The script works fine when run through the terminal, or when "silent" is unchecked in version 1, but there is no output to the Notification Center.

     

    I've read the article here, and tried using read to parse the {query} string, but to no avail.  Here is the full script, fwiw:

    read IP NETMASK <<< "{query}"
    elinks -dump "http://jodies.de/ipcalc?host=${IP}&mask1=${NETMASK}&mask2=" | awk '/^Address:/,/^Hosts/'
    

    Any ideas?

×
×
  • Create New...