Jump to content

Search the Community

Showing results for tags 'script filter'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting


  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




Found 50 results

  1. I Sheet You Not Create auto-updating workflows from Excel worksheets. Works like a List Filter but using an Excel file as the data source. I Sheet You Not is a workflow generator/template for Alfred 3. It reads data from an Excel workbook and displays them in Alfred. You can specify which rows and columns the data are read from, and changes to the data are picked up automatically by the workflow. Download and installation Download the workflow from Packal or GitHub releases and double-click the downloaded I-Sheet-You-Not-X.X.X.alfredworkflow file to install in Alfred. Usage Use keyword isyn to create a new copy of the workflow. You can either create an empty copy or search for an Excel file to base the workflow on. See the documentation for detailed usage/configuration instructions. Source code The source is hosted on GitHub. Bugs and feature requests Bugs and feature requests should ideally be submitted via GitHub issues, but asking in this thread is cool, too.
  2. Alfred Maestro Possibly the last workflow you will ever need for system tasks I recently started using Keyboard Maestro (KM), and so far I love it. So I made this workflow to allow you to execute any KM macro straight from Alfred. Downloads - My Site: http://iansinnott.com/blog/integrating-alfred-and-keyboard-maestro/ - GitHub: https://github.com/iansinnott/keyboard-maestro-alfred Basic Usage Type 'km' followed by the name of the macro you want to trigger. Dependencies Keyboard Maestro More Info Check out the readme in my Github repo linked above. Also, check out my blog post about these two apps if your interested in how I actually use it. That's also linked above as the first download link. Quick Note: I only tested this on the latest version of php (5.5.5 as of this writing). This is not the standard installed version that comes with new Macs, so if you have any trouble with the workflow let me know. Cheers, Ian
  3. Here's another little tool I've just whipped up: Get an instant list of the current time in various cities around the world. Which you can customize, of course. Main keyword: tz (for TimeZones) - this just shows the World Clock list (seen above). (Select a city for a Large Type display.) To remove a city from the list - option-select it. To add a new city - timezone add Name of City To update all cities' timezone offset information - timezone update To look up the time in a place without storing it (custom loookup), just keep typing the place name after the initial tz (eg. tz timbuktu) To move the location of your stored city list - timezone move Download v1.7a This workflow saves a list of your cities and their UTC offsets locally, so the basic world clock will display instantly. Adding new city information is done via an API call to Google Wolfram Alpha. The only downside to locally cached offsets is that there's no provision for automatically updating for Daylight Savings changes, but a manual timezone update will refresh all the cities with their current offset. Enjoy. As usual, I welcome comments, bug reports, feature requests, etc. ---- 28 March 2013 - UPDATE to v1.5 Major rewrite - now uses Google Maps APIs, which should be a lot more reliable and consistent. Flag icons! Bit of eye candy, courtesy of http://www.free-country-flags.com (and managed to squeeze flags for every country in the world into just over 400k - thank you TinyPNG ) More detail retrieved and displayed, including timezone name, country, etc. When doing a full "update", a text file is saved to your Desktop summarising any changes found. General enhancement and tweaks. PLEASE NOTE: Because this version stores its data substantially different to previous versions, it will create a new timezones.txt file with default cities. However, it will attempt to save your old timezones.txt file to your Desktop, so you should be able to rebuild your previous list without too much hassle. A quick note about the flags: The workflow simply compares the retrieved name of the country and does a simple name match against the workflow's local repository of flag icons. From my testing, it's working very well, but I'd appreciate it if you'd report back if you find any countries that don't properly match a flag icon. Cheers. ---- 31 March 2013 - UPDATE to v1.6 New feature: Custom lookups. Just keep typing a new place name after the tz keyword to look up the time in a place without saving it to your saved list. Added support for phyllisstein's Alleyoop auto-updater. [EXPERIMENTAL] - support for autocomplete for adding place names (timezone add). You'll need to add a keyword yourself to the script filter if you want to try it out. The reason I haven't enabled it by default is that I've found it kind of slow and I'm not sure it's actually an improvement over the current method. Let me know what you think. [Add a keyword to this script filter if you'd like to try it out] Novelty: Added (unofficial) Antarctica flag to flag repository. (Try tz south pole. ) ---- 2 April 2013 — UPDATE to v1.61 Small fix for Dutch (Netherlands) flag matching. ---- 22 March 2014 — UPDATE to v1.7 City List now always shows in the same order. (Achieved by removing “uid” parameter.) Removed Alleyoop updater. ---- 22 March 2014 — UPDATE to v1.7a New 256x256px icon
  4. I just released a Screen Sharing workflow with automatic discovery of hosts that have remote desktop enabled. Such amazing things are now possible thanks to the "Script Filter" input! Download — stable version. The source code is available here: https://github.com/pstadler/alfred-screensharing
  5. Inspired by Don Southard's Screen Sharing Workflow for Alfred v1 I have made VNC workflow using Alfred 2 dynamic list feature. First of all here is the download → link To add machines simply write vnc setup and after space insert machine name, its IP address and optionally port, exactly like that: Name-IP_address:port for example: Living Room- To delete machines write vlc delete and choose from list which machine you would like to delete. Please, feel free to comment, to give some hints, etc.
  6. Alfred's default handling of workflow variables set by modifiers is … odd. Setting variables via Script Filter feedback at the top level and via items behaves sensibly, and as you might expect. Namely, they are merged with existing variables, overwriting any of the same name. Setting variables via mod does something completely different. If you set any variables via a mod all other variables created during the execution flow (i.e. set anywhere but in the configuration sheet) are dropped on the floor. Not just top-level variables, but also pre-existing ones set upstream via Args & Vars or a Hotkey or passed in via an External Trigger. This is counter intuitive, counter to the way variables set elsewhere work, and I don't see an actual use case for mods to behave that way. It's fine that variables set by item the mod belongs to are not set when a mod is used, but top-level variables should not be ignored, imo, and existing variables from upstream should definitely not be deleted. I would suggest that mod variables should be handled the same way as item variables and be merged with top-level variables and existing variables from upstream.
  7. This is my error : [ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON: input the {"items":[]} "input the" is the result of code "echo $userInput This Alfred node, runs a script called search.rb. I've screen shotted it below as well. The script calls all redbooth API's(a project management app) Projects, Tasklists and tasks. It then runs a loop through each item and looks for titles that match the user input/ARGV. I have run the script locally in my terminal and the script returns the correct objects and should be printing them/returning to Alfred. However I get the above issue and I can't seem to figure out where my disconnect is. Additional info/screen shots below. search.rb/the script alfred runs to generate the script filter options. This code(below/list_proj.rb) calls the redbooth API and takes all returned objects/projects and converts the data to json. When the script rubs as is in a alfred script node- it populates the filter options. This code works to the desired effect. Posting for comparison This is a snap shot of the work flow. Everything works with the exception of the Search function/nodes Please let me know if I can provide anything else. I have a separate plugin that provides user auth for the work flow to access the redbooth client API. Any insights to this error or what I may have missed would be well appreciated. Thanks!
  8. This is a workflow to mount your network shares with automatic discovery. No configuration or bookmarks required! Download — stable version. Please report problems here. Your computer won't explode and your shares are safe, I promise. Troubles? Make sure that both, Apple Filing Protocol (afp) and Samba (short smb, QNAP calls it "Microsoft Network") are enabled on your NAS. Due to the nature of the protocols and the available tools on OSX, both of them are required in order to disover network shares in your network. Also note that already mounted shares are not listed in Alfred. Enable guest access to the NAS, not for a specific share, but for the system in general if things don't work. The source code is available here: https://github.com/pstadler/alfred-mount
  9. Since this is what I think the standard way to set an environment variable from a Script Filter, I think this should be working, but feel free to move this post to the feature request if this the normal behaviour and not a bug. When building a workflow that works with files and folders, I like to allow to run actions on those files/folders. So, since the File Action is made for that, I like to just activate it on my script filter output item by using my File Action shortcut (sets to cmd-cmd in my case). However, when I want to set an environment variable inside the Script Filter, then the File Action shortcut doesn't work anymore even if "type" is set to "file" in the JSON. Since this environment variable is used when I normally activate the selected item on my workflow by pressing enter and could change based on which item of the Script Filter is activated, I need to set it inside the Script Filter and not after or before, but would like to keep the default behaviour of the " 'type': 'file' " item. Here is a workflow to demonstrate this: https://nofile.io/f/xZGFinuS44I/Script+Filter+-+File+Type+with+File+Action+-+Test.alfredworkflow Let me know if something isn't clear enough! Best!
  10. Hello, I don't know if it's possible to emulate this behavior with a workflow trick (other than duplicate the script filter), but I think it would be useful to allow to have multiple keywords for a single script filter. It could be used to set multiple language keywords (like "weather" and "météo" in french), or just add a shortcut (like "w" or "wiki" for a wikipedia autocomplete workflow)
  11. Alfred 3.4 (850) type = file is ignored on feedback items when workflow variables are also set via arg (i.e. arg is a JSON-encoded alfredworkflow object). Run the following workflow or build your own Script Filter around the JSON feedback. You can hit right-arrow on the first item with a "plain" arg to access File Actions. File Actions don't work on the second item, however. Demo workflow. Script Filter feedback: { "items": [ { "title": "Path, no vars", "subtitle": "This works with File Actions", "type": "file", "arg": "~/Desktop" }, { "title": "Path, with vars", "subtitle": "This doesn't work with File Actions", "type": "file", "arg": "{\"alfredworkflow\": {\"variables\": {\"var1\": \"val1\"}, \"arg\": \"~/Desktop\"}}" } ] }
  12. I'm not sure if this is a bug, but I'm trying to get a query with multiple spaces in it and "as is" (meaning that I want the the left and right trailing spaces). Right now, Alfred trim the spaces to only one if multiple are inserted at the beginning or end of a query. This is working if using a "keyword input" so it seems to be a problem with the script filter input method. I've tried using the "with input as argv" or "with input as {query}" and both output the same. Here is my test script for the Script Filter input (using Python): import sys, json query = sys.argv[1] #query = """{query}""" # uncomment if trying with "with input as {query}" data = { 'items': [{ 'title': "Script Filter: The query is '" + query + "'", 'arg': query }] } sys.stdout.write(json.dumps(data)) Here is a screencast to show the problem: https://NoFile.io/f/4334MTCdPQ5/Alfred-SpaceInQuery-Problem.mov Is this a bug or there's something I'm not doing well or it's just not possible with the Script Filter input ? Thanks!
  13. I'm trying to figure out how to trigger an action from a script filter in the event that there's no match. I've hacked together a workflow (hotkey: cmd+shift+2 --> script filter) that allows me to manage text keywords/tags, and I'm trying to refine it further. Currently, the script filter I've cobbled together selects existing keywords/tags from a json file and pastes them wherever the cursor is placed or, if an action modifier is invoked at point of selection, deletes the selected keyword from the json file. I've already figured out a separate workflow that can allows me to add a keyword to the json file, but I'd like to everything to be triggered by the same hotkey. Any pointers? Thanks in advance for any help!
  14. Alfred version 3.2 pre-release (757) It's a little hard to explain, so here's a workflow to demonstrate the bug. And a screenshot: When External Trigger "target" is called the first time via the top row of elements, the variables are correctly passed to the red Script Filter. However, when the red Script Filter calls itself via the same external trigger, no variables are passed to the Script Filter by External Trigger "target". The variables are passed to Debug and Run Script objects (not visible in the screenshot). arg/query is passed correctly. EDIT: Here's the bug in action:
  15. I’m trying to create a workflow that will display the current time when I type "time" into Alfred. I can’t figure out how to use a bash variable within the JSON object in the heredoc. This is what I have but the item doesn’t show. If I add other fields the one with the variable remains empty. time = date "+%H:%M %p" cat << EOB {"items": [ { "title": $time } ]} EOB I’ve also tried "$time" and '$time' but nothing works. I feel like I’m missing something basic.
  16. I've run into the situation with a bunch of my workflows where I like to return a status line of sorts. For example on my emoji workflow I show a match count. I use the `valid=False` command to make sure you cant interact with it but it still gets a ⌘1 hotkey. I suggest the following possible change: Could there be a flag such as `header=True` and this item would serve as a header item. You could only have a single header per results returned and if you had multiple it would just take the last one (or the first one) and render it like a header line. It would not be assigned a hotkey but would server as a header of sorts. (just an idea)
  17. Hi everyone. I have a bash script that looks up my bookmarks on Pinboard.io and returns correctly formatted xml. Although the script outputs to stdout immediately, Alfred doesn't pass the output to the script filter until the whole (longer running) script has finished and returned. Is there a way to avoid this delay? Cheers, Teo
  18. Hi All, I have looked on the web for the answer to this and have not found what I am looking for. My problem is this: When I start a workflow execution that requires and argument, I want to search my clipboard history for that argument. Since I have already called up alfred with 'Command'+'space' and typed my workflow in, when I go to input the argument needed I want to again enter 'Command'+'alt'+'C' to search my history for the argument. Once I do this, alfred's state change to the clipboard history and I can't return to where I was before with the start of the workflow. Of course the workaround is to make sure the argument I need is already the first item in my clipboard history so I can easily just paste it in without searching, but it would be nice if I could search. It decrease my error rate during clutch situations for sure. Let me know if I am not clear in my question. Thanks! Dave
  19. Hi, I'm using Alfred 3's Script Filter + JSON format to return a list. However, I found that despite I output a static ordered list, the ordering that display on Alfred is dynamic. That is, Alfred seems to alter the ordering. It looks like Alfred tend to put the most recent used item to the top. I'm wondering if there is any way to configure this behavior or turn it off? Thanks.
  20. I have a script filter that outputs a value. When passing this value into a downstream script filter, the argument is only available (via sys.argv) if the "Alfred filters results" box is unchecked. When checked sys.argv[1] throws an index out of bounds error. When not checked, the argument is available as expected.
  21. Good morning, I'm currently trying to create a simple Script Filter Alfred 3 Workflow using Python. I found an earlier example which demonstrated how to pass XML results to a Python workflow: xmloutput = """ <?xml version="1.0" encoding="utf-8" ?> <items> <item arg="testitem"> <title>FooBar</title> <subtitle>foo bar is a test item</subtitle> <icon>icon.png</icon> </item> </items> """ print(xmloutput) My question is, what is the syntax for doing the same with the new JSON data structure? regards, Andrew
  22. Hi I have question regarding the "Alfred filters results" script filter option. Does it support fuzzy filtering?
  23. Hello. Today I've experimented with Safari's windows management through Alfred & AppleScript and encountered with greatly strange issue. As you probably know, every window object in AppleScript has standard properties which are described in Standard Suite: id, name, miniaturized and the like. In Script Editor I can obviously get any of these properties and I thought I can do the same in Script Filter too. However when I try to get miniaturizable and miniaturized properties in a Script Filter's script, the script fails with an error "Safari got an error: Can’t make |miniaturized| of item 1 of every window into type reference." under number -1700. I've created this simple example to illustrate the issue: repeat with safari_window in every window of application "Safari" try log (get miniaturized of safari_window) on error msg number -1700 log msg end try end repeat When I run it in Script Editor it executes as expected and logs true/false values, but when I call it from Script Filter it produces errors and logs error messages: [STDERR: alfred.workflow.input.scriptfilter] Safari got an error: Can’t make |miniaturized| of item 1 of every window into type reference. Safari got an error: Can’t make |miniaturized| of item 2 of every window into type reference. Safari got an error: Can’t make |miniaturized| of item 3 of every window into type reference. Safari got an error: Can’t make |miniaturized| of item 4 of every window into type reference. Safari got an error: Can’t make |miniaturized| of item 5 of every window into type reference. Safari got an error: Can’t make |miniaturized| of item 6 of every window into type reference. Safari got an error: Can’t make |miniaturized| of item 7 of every window into type reference. Also it isn't a Safari issue. Other applications behave the same way. Can someone explain me, why is it happening? Thank you.
  24. Hello. I try to write my first script filter plugin, but I've encountered a unexpected trouble with Unicode (non-ASCII) characters. This is a simplest example I could invent: xmloutput = """ <?xml version="1.0" encoding="utf-8" ?> <items> <item arg="testitem"> <title>FooBar</title> <subtitle>foo bar is a test item</subtitle> <icon>icon.png</icon> </item> </items> """ print(xmloutput) (I call it from script filter as /usr/local/bin/python3 outputtest.py.) It works fine until I want to add some non-ASCII characters: xmloutput = """ <?xml version="1.0" encoding="utf-8" ?> <items> <item arg="testitem"> <title>FooBær</title> <subtitle>foo bær is a «test item»</subtitle> <icon>icon.png</icon> </item> </items> """ print(xmloutput) Then it fails: [ERROR: alfred.workflow.input.scriptfilter] Code 1: Traceback (most recent call last): File "outputtest.py", line 12, in <module> print(xmloutput) UnicodeEncodeError: 'ascii' codec can't encode character '\xe6' in position 88: ordinal not in range(128) Why it happens? I can't believe that Alfred do not use Unicode in input/output. I think the root of problem in something else, but I can't find out where is it.
  25. Is there a way to map output actions to specific items without having to use action modifiers? I have a script filter that I am using in alfred and I want each item to have its own return output. For example, if I press enter on the first item, I want it to copy to the clipboard and post a notification. I want the second and third item to not return anything. I want the third item to launch terminal when the user hits enter. I want the fourth item to launch a webpage when the user hits enter. IP=$(host google.com | cut -c 30-) CITY=$(curl http://ipinfo.io/$IP/city) STATE=$(curl http://ipinfo.io/$IP/region) PROVIDER=$(curl http://ipinfo.io/$IP/org | cut -c 8-) //Start Display cat<<EOB <?xml version="1.0"?> <items> //Remote Server's IP <item arg="$IP" valid="NO"> <title>Remote Server's IP: $IP</title> <subtitle> Press Cmd + C to copy </subtitle> <subtitle mod="cmd">Cmd + C to Copy</subtitle> <text type="copy">$IP</text> <icon>69288C18-2A0D-4430-837E-4AB331CD2698.png</icon> </item> //Location (City, State, Country) <item arg="$CITY, $STATE" valid="NO"> <title>Location: $CITY, $STATE</title> <subtitle>This is Location of the Server</subtitle> <icon>icon.png</icon> </item> //ISP Provider <item arg="$PROVIDER" valid="NO"> <title>Provider: $PROVIDER</title> <subtitle>This is the ISP Provider</subtitle> <icon>Wired_Network-100.png</icon> </item> //SSH into server <item arg="$IP"> <title>SSH into Server</title> <subtitle>Press Enter to connect</subtitle> <icon>Connected-100.png</icon> </item> //Open Web Page <item arg="$IP"> <title>Connect to Web Server</title> <subtitle>Press Alt + Enter to connect</subtitle> <subtitle mod="alt">Launch Webpage</subtitle> <icon>Open in Browser-100.png</icon> </item> </items> EOB
  • Create New...