Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Everything posted by deanishe

  1. Truth be told, I actually have no idea what it does Can it manage my Ebook collection?
  2. IIRC, that was mostly just a dumb mistake by me. That one, at least, is fixed in the newer code.
  3. If you use pint in a workflow, it's a good idea to remove the call to git in __init__.py. If a user doesn't have git installed, OS X will ask them to install Xcode, which is confusing.
  4. Web stuff is a bit of a chore in AppleScript. It'd be a lot easier with something like Ruby or Python. PHP can do it, too, but PHP's HTTP libraries are much lower level, and therefore more complicated, than Ruby's or Python's (but also more powerful). My own Python library makes sending POST requests a doddle, and there are some great libraries available for many languages. If you need to handle logging in, sessions/cookies, navigating pages and the like, you can use something like requests or mechanize (both Python libraries). For parsing HTML, BeautifulSoup is your friend.
  5. With regard to non-default fonts, Alfred could do what CSS does and allow you to specify a list of fonts, and fall back to a built-in font if none of the specified ones are found.
  6. It's a nice idea, but how could it be implemented? The way Alfred runs workflows means the interface is essentially text-only and language agnostic. To pass native objects, Alfred would have to embed the Python, Ruby, PHP and bash interpreters in the application (like Sublime Text or Vim). You can do that with Python and Ruby, but I don't think PHP/bash are embeddable. Any more complex types than "text" would have to be passed in a text format, like JSON, YAML or XML.
  7. Updated to fix a problem with git/Xcode. You will no longer be prompted to install Xcode if git is not installed on your system.
  8. Do you mean this workflow? If so, could you post in that thread? This one is for different software. To actually answer your question, yes, I've figured out what the problem is. I'll post an update in the appropriate thread once I've fixed it (maybe an hour).
  9. Update: Added 5 new search engines: Amazon eBay Google Images Google Maps YouTube
  10. I've just made a workflow that supports quite a few auto-suggest search engines. It's written in such a way that you can (relatively) easily add new ones. A bit of coding is necessary, though. The problem I had was finding search engines that support the auto-suggest interface. If you know of any, please let me know. I'd love to add a few more.
  11. Added support to Alfred-Workflow. Currently only used internally to save parsing info.plist, but I'm sure someone will think of other uses.
  12. I was getting confused again. I meant OPT+ESC, which is the system default completion key.
  13. It might be handy to have the bundleid and possibly the name of the workflow. I mostly use the bundleid for calculating the data/cache paths (which will hopefully be added), but also for naming, e.g., log files. It'd be great not to have to parse info.plist.
  14. Thanks. The problem for me is I try to make the "cog" very subtle in my themes, so that setting isn't useful for determining whether a workflow should use its light or dark icons (which is what I was hoping to use if for). No matter. The theme background works a treat for that, as Shawn had already done the hard work of figuring out an algorithm to determine a colour's darkness The cache and data paths would be useful. If a workflow script relies on those, however, you can't test it from a shell. Or am I the only one who does that?
  15. Right. I thought it indicated whether you should use "light" or "dark" icons on that background. Pity
  16. This is totally awesome. Does alfred_theme_iconstyle mean what I think it means, or is this a bug? The values seem to contradict those in your example, Andrew.
  17. I only meant that my proxy.pac was definitely sending PROXY XXX, not DIRECT, when it sees Alfred's user-agent, i.e. I wasn't sending the wrong value. I hadn't thought that through properly. I looked at the proxy.pac format again, and it just doesn't work that way. The client is supposed to call the FindProxyForURL(url, host) defined in proxy.pac for every URL (hence the point-in-time resolution), which Alfred can't do for its workflows. Static values for http_proxy and https_proxy are the shell standard for proxy servers, and Alfred can't be expected to provide more that than. Any script that works with a proxy server from a shell should now also work in Alfred, but with the sweet bonus that Alfred also automatically adjusts the proxy server based on OS X's Network Location, which you can't do properly in a shell. Thanks very much for adding this feature to Alfred. It isn't really possible to do from within a workflow, and that made a lot of them useless for some users pre 2.4. I guess Auto Proxy Configuration will have to remain the exclusive preserve of Objective-C workflows…
  18. Until smarg19 breaks it, which he always does, the blighter.
  19. You don't need to check everything. Only the options specified here. No point escaping spaces in a string enclosed in quotes. That said, it seems to work just fine. Great work!
  20. Fundamentally, Terminal.app (and iTerm.app) do not export any proxy settings in System Preferences to shells. iTerm.app itself does use the system proxy when checking for updates because it's a Cocoa app, but neither of the apps do (or can be configured to) export the proxy settings to the shells running within them. Shells apparently run at the lower UNIX system level, while the proxy servers configured in System Preferences belong to the Objective-C runtime. To use a proxy from anything that's standard UNIX in the shell, you have to set http_proxy/https_proxy manually. Any settings in System Preferences are ignored. Auto Proxy Discovery and Automatic Proxy Configuration are two different, but related, things. The former is a protocol usually used to find the latter, which is a JavaScript file that when executed tells the client whether to use proxy server XXX or connect directly. I have my proxy.pac set up to tell applications to either use the proxy server or connect directly based on the user agent. I want some apps to use my ad-blocking proxy and others to be subject to Little Snitch. Alfred is always given the proxy. I've run a few tests, changing my proxy.pac file to always specify the proxy server, and never direct, but still using Automatic Proxy Configuration. In that case, Alfred uses the proxy (to check for updates etc.), as does targumanu's IMDb workflow, which is written in Objective-C, however the http_proxy and https_proxy environmental variables remain empty in Alfred's calling environment, so Python/Ruby/cURL do not use the proxy server. To be clear, it's unreasonable to expect that my proxy.pac would fully work with workflows (i.e. they run proxy.pac and it sends DIRECT or PROXY XXX back based on the workflow's user agent), but Alfred is being told to use the proxy and isn't propagating that setting.
  21. Got you. Working fine now. Great work. You should probably think about using Alfred's Escape options: if someone enters a query with ", $, ` or \ in it, the workflow won't work properly.
×
×
  • Create New...