Jump to content

robhor

Member
  • Posts

    10
  • Joined

  • Last visited

  • Days Won

    3

robhor last won the day on February 6 2013

robhor had the most liked content!

Profile Information

  • Location
    Austria

robhor's Achievements

Helping Hand

Helping Hand (3/5)

20

Reputation

  1. Bad news, a whois lookup reveals that the domain is registered to "African Large Format Print Techn"
  2. Thanks, I've updated the workflow, should be fixed now!
  3. Thanks, I updated the workflow to protect against that! Still works for me (on b94)
  4. Good suggestion! Option-click doesn't work very well with this type of menu, as I can only set one modifier subtext for every item in the whole workflow, including the menus (eg. "Browse"). I could set it to "Alternative action", which I find too non-descriptive, and isn't even true for items that don't provide an alternative action. Instead, the "hide" option is now available when drilling down into a workflow in "Browse" and "Installed". I want to keep installing and updating quick, so I won't drill down on pressing enter when in those menus, but I found something new: You can now press Tab to drill down into a workflow, even in the "Install" menu. Hidden workflows can still be found in "Browse > Hidden" Yep, you can set the timeout in the config file here: ~/Library/Application Support/Alfred 2/Workflow Data/at.robhor.alfred.alfredrepo/config In there, you'll find max_cache_age, set it to how many seconds you'd like, eg. 7200 for 2 hours Updated workflow found in the usual places… AlfPT or in itself or via updated link in the original post ---- Based on a request I've added some rotten tomatoes data to the movies workflow:
  5. Sure, I'll explain it kind of conceptually what's going on and how it's implemented. The three key factors here: * Building paths using a separator character (➣) in the query * Autocompletion to help build those paths * Using ids in the path Based on the current "path" in the query i decide what results to show. So if nothing has been entered yet, in the case of the workflow repository one, i show the 4 main menu entries, each of which autocompletes to a defined Tag + the separator. The next invocation of the script might be with the query "Browse ➣ ". In that case I present all workflows, each of which autocompletes to "Browse ➣ (bundle id of workflow) ➣ " I use the bundle id in the path because the next menu needs to know what you chose. For the movie workflow I use the IMDb-ID. It would be prettier if I could use "Shutter Island ➣ " in the path, but sadly that isn't unique enough. It would also allow deleting the separator character with backspace and thereby going back to the previous menu and still get sensible results back (as the query would then be "Shutter Island" and not "tt1130884", the IMDb-ID). But the query string is the only transfer mechanism we have to determine what item has been chosen. For more information on how do the autocompletion check this out (basically, set valid="no" and autocomplete="your path" on an item) So far for the concept. On the implementation side i have the helper module AlfredFeedback. In there I have helper functions "get_path" and "get_query". get_query returns the very last part of the actual query-string given to the script get_path returns the current path as an array So for example "Installed ➣ com.linuslundahl.alfred.phpfunctionsapi ➣ open" would result in get_path: ["Installed", "com.linuslundahl.alfred.phpfunctionsapi"] get_query "open" These help in deciding what items to present. (In that example, I check if path is two segments long, which would mean I'm in the submenu for a workflow. The last segment is the bundle id of the chosen workflow and I show the "back", "update", "uninstall" and "open workflow folder" items. I apply get_query as a filter so that only the "open workflow folder" item remains) Next I have a simple class called Item that just holds all the information for an feedback result item (title, subtitle, icon, arg, …) Extending that I have a class called Menu. These are the items that bring you to a submenu. They have their autocomplete-attribute automatically set to the current path + the argument of that item + separator, and valid to "no". Lastly I have the class Feedback, which gathers Items (and Menus) with add_item and add_menu methods. (I also have .fixed_order in there, which automatically gives the items an uid of timestamp + index in item list, thereby the items are always presented in the order they are specified) (And .autofilter, which takes the query to filter the items before printing them out if set) After that just print out the feedback.to_xml As for allowing different kinds of action on an item: I use argument-strings in the form of "(action):(parameter)". In the movie workflow I have a whole bunch of actions for showing an image, opening URLs, showing large text, .. This argument-string is passed to an output-script and appropriate action is taken.
  6. Hey, I was experimenting with workflows that allowed "drilling down" into an result to provide more options, and here's what I came up with. Firstly, a workflow that uses omdbapi.com to search for movies, actioning a result shows you more information and actions. Download: here or via AlfPT As a second workflow using this I built an alternative client workflow to Tom Hunt's Alfred Workflow repository. It has some performance improvements over the "official" AlfPT workflow, and a few extras like updating all workflows, uninstalling and opening workflow folder from within the workflow. Download: here or via AlfPT
  7. Convert numbers between binary, octagonal, decimal, hexadecimal Download: http://cl.ly/2a01053F2g29
  8. Hi everybody, On the one hand, this is an adaptation of an v1 extension I used, Color Chooser by TDB ( http://plugins.ro ) On the other hand, you can also copy some hex color codes into alfred and see the color itself: Which you then can proceed to copy as rgb values. The code for this is a quickly thrown together, horrible amalgamation of php, ruby, sh and apple script; but it works nicely Download: http://cl.ly/0M0L1w1B0S3Q
×
×
  • Create New...