Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Everything posted by deanishe

  1. Until smarg19 breaks it, which he always does, the blighter.
  2. 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!
  3. 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.
  4. 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.
  5. Terminal.app/iTerm.app don't set http(s)_proxy for you, regardless of the settings in System Preferences > Network. Proxy env vars have to be set manually or in your dotfiles.
  6. It doesn't really compare to the OED, does it? That thing's huuuge… Can't you just use AppleScript to "press" CMD+C, then bring OED to the front? activate should even work for apps written in Flash.
  7. It wouldn't work at all for me. I tried deleting the --escaped argument, and now it does. Is there a reason you're not using Alfred's Escaping options? Normally for bash, you'd want Backquotes, Double Quotes, Backslashes and Dollars.
  8. Sweet. It works fine if I set the proxy manually via "Web Proxy (HTTP)" and "Secure Web Proxy (HTTPS)": all my Python workflows automatically use the proxy. Unfortunately, it doesn't work with Automatic Proxy Configuration, which is what I use Alfred itself has no trouble picking up and using the proxy. I've just watched it hit media.alfredapp.com/v2update/ via the proxy log. I'm not sure how common it is to use a proxy.pac configuration file, but it's how I always used to do it when I was in charge of a network.
  9. Not sure, to be honest (I don't have SL to test it on). It should be, however. I don't believe it uses any Python features that weren't around in 2.6. Give it a try, and if there are any errors, we might be able to fix them.
  10. I've uploaded a new version with a different URL for Google and an optional setting to toggle showing the query in the search results (use searchio to view the setting and action the "Show query in results" item to toggle the setting). Could you give that one a try and see if Google now works properly for you?
  11. It was probably a connectivity error, by the looks of it. The main bundler archive wasn't downloaded correctly, and the bundler wrapper isn't yet smart enough to recover from that (one of the reasons it's still really not production ready). Unfortunately, there also isn't an easy way to uninstall the bundler, so it can try again. Ask your user to delete their ~/Library/Application Support/Alfred 2/Workflow Data/alfred.bundler-aries directory and try running the workflow again (with an Internet connection). You might want to consider adding a command to your workflow that can delete the bundler until it's stable.
  12. What browser are you using? When you action a search result in the workflow, what URL does your browser show?
  13. They have changed their stance: you now have to enter your user password to view a password (which makes it as safe/unsafe as Safari and Keychain). Your PIN would be protecting nothing but a URL. The URL is probably available in your Chrome history, anyway (if you didn't use porn mode), and definitely in your list of saved passwords. If you want to do this anyway, you have 2 options as I see it: Store the URL in Keychain using the security utility. At least this way, it isn't in plain text on your HD. Encrypt the URL, require a password to be entered as a query to your workflow, and decrypt the URL before opening it in your browser. In either case, you're not adding much in the way of security. If you want actual security that isn't easy to get around, do what Vitor says and use a proper password manager like 1Password to store the username and password.
  14. I found myself using Duden a lot, so I wrote a Duden workflow with live search suggestions here.
  15. Alfred Duden.de Search Workflow Search the definitive German dictionary at Duden.de with auto-suggest. Download and installation Download the Workflow from the GitHub releases page or Packal. Double-click the Duden-Search.alfredworkflow file to install. Usage Default keyword is duden. Enter your query after that. Actioning a result with RETURN will open the full results page at duden.de in your browser. Holding ⌘ on a result will show the URL it will open. Licensing, thanks The code of this workflow is released under the MIT licence. This workflow is based on the Alfred-Workflow library (also MIT-licensed).
  16. Hmm. No, it shouldn't be doing that with Google. I did try with including the search query as-is as the top result, but ultimately decided against it. If that's what folks want, I'll put it back in. If you don't mind hacking the source a wee bit, if you comment out line 112 in search.py and uncomment lines 114 and 115, that will make the entered query the first result. Using a modifier to turn off suggestions won't work, as that isn't how Alfred uses modifiers. In that case, I'd suggest assigning, for example, the keyword s to a standard Alfred Web Search and si to a Searchio! auto-suggestion search. It should be easy enough to add other search engines, depending on their suggestions API.
  17. I've added a demo workflow using the Python bundler to Packal. It doesn't do anything useful (shows a few icons and dates), but the source code shows how to use the three main features (automatic, transparent installation of libraries, utilities and icons), and it extensively commented. Usage: bundleicons [<query>] — Show 5 FontAwesome icons, either randomly chosen or matching <query> bundlecolour — Choose a new HTML/CSS colour for the icons. Try entering an invalid colour to see an error dialog. bundletime — Shows the current time in a bunch of random timezones. Uses the pytz library, installing it first if necessary.
  18. CTRL is one of the modifier keys you can use to perform alternate actions on results. ESC would be a better choice, but why can't you use RETURN to action items?
  19. Searchio! workflow for Alfred Auto-suggest search results from multiple search engines and languages. There are a few existing workflows that provide auto-suggest results from one or the other search engine, but this includes not only multiple search engines, but also allows you to specify multiple languages/regions for your results. Supports the following search engines/websites: Google Google Images Google Maps YouTube Wikipedia Wiktionary Amazon eBay DuckDuckGo Bing Yahoo! Ask.com Yandex.ru Naver.com Wikia.com Download and installation Download the latest version from the GitHub releases page or Packal. Usage There are several searches pre-configured. Only some have keywords (i.e. can be used as-is): g — Search Google in system (i.e. default) language m — Search Google Maps in system (i.e. default) language gi — Search Google Images in system (i.e. default) language w — Search Wikipedia in system (i.e. default) language wn — Search Wiktionary in system (i.e. default) language a — Search Amazon in system (i.e. default) language. If your system language is English, this will search Amazon.com. Use -l uk in the Script Filter to search Amazon.co.uk or -l ca to search Amazon.ca. yt — Search YouTube in system (i.e. default) language searchio [<query>] — Show settings and list of supported search engines. Currently, the only setting is a toggle to also show the <query> in the results list (default: No). searchiohelp — Open help file in your browser You can add a keyword to (and edit) one of the existing examples or add your own searches. For details on how to do that, see the GitHub page. Licensing, thanks The code in this workflow is released under the MIT Licence. The icons belong to the respective search engines. This workflow uses the Alfred-Workflow library and docopt (both MIT-licensed).
  20. Is the git repo actually /Users/ae/_arm-new/arm_lib, not a subdirectory thereof? The workflow only searches subdirectories of the search_dirs. It won't match the search_dirs themselves. Can you change the path to /Users/ae/_arm-new instead, or is that directory tree too big?
  21. Alfred's knowledge is not applied if valid="no". Alfred only learns which results to prioritise when items are actioned. If an item isn't actioned (which it can't be if valid="no"), Alfred won't learn to prioritise it for that query.
  22. If you want to make it faster, cache the JSON file. The way Alfred works is it will call your workflow every time you type a letter. So, it will try to call the workflow 4 times if your query is 'test'. Alfred won't call your workflow again until the previous run has finished, so typically your workflow will block for several seconds if it does something really slow like getting data from the web. I don't know what JSON file you're grabbing, so I've no idea whether 10 seconds or 10 hours is a more appropriate time to cache it for, but that's what you need to do to speed up the workflow.
  23. Can you run these commands: find -L /Users/ae/_arm-new/arm_lib -type d -name .git -depth 1 find -L /Users/ae/develop/_sites/_webhook/aesite -type d -name .git -depth 1 Those are the commands the workflow will use to find your repos. You might need to adjust the depth setting if the repos aren't direct subdirectories of the search_dirs.
×
×
  • Create New...