Jump to content

deanishe

Member
  • Posts

    8,759
  • Joined

  • Last visited

  • Days Won

    522

Everything posted by deanishe

  1. I went with your advice, sort of. I'm still keeping the code in a subdirectory because I need to put the .alfredworkflow file in there, too. But I wrote a build script that excludes the files I always forget to delete, and an install script that can symlink the workflow to Alfred's workflow directory when I'm working on it and install it properly when I'm not.
  2. This would be a fantastic feature, but there are a couple of (closely-related) roadblocks. Firstly, Alfred currently doesn't sync workflow data (what workflows save to their settings/cache directories), so some workflows save things that you'd really like synced, like API keys, in the workflow directory itself. These data would probably get overwritten on every update. This might cease to be a problem if Alfred provides a specific location for such workflow sync data. Secondly, and less solvably, any user customisation (e.g. changed keywords) would also be lost on update. Some workflows, like one I just uploaded, are designed with customisation in mind. It will be very difficult to update workflows without losing such customisation.
  3. SmartFolders: Browse and search the contents of your Saved Searches List all the Smart Folders/Saved Searches (same thing) on your system and drill down into their contents. Works in much the same way as Alfred's File Filter, but Smart Folders are also available outside Alfred and are a bit more flexible. For example, you can configure a Smart Folder to show all video/audio/image files without having to specify each different filetype individually. If you already use Smart Folders, this workflow can save you the work of re-implementing them as File Filters. What's more, you can exclude specific filetypes with a Smart Folder, which Alfred cannot do. Features View and search a list of all Saved Searches on your system View and search the contents of the Smart Folders Add your own searches to go straight to a specific Smart Folder with a custom keyword Download/Installation Grab your copy from here. Install in the usual fashion. Usage .sf — List all your Smart Folders .sf [part of name] — Search for a specific Smart Folder TAB — Browse/search within Smart Folder ENTER — Open Smart Folder ⌘+ENTER — Reveal Smart Folder in Finder (same effect as opening it) .sf FOLDER 〉 [part of name] — Search contents of Smart Folder FOLDER ENTER — Open selected file/folder in default application ⌘+ENTER — Reveal file/folder in Finder smartfolders-help — Open included help file You can also set up your own Script Filters with a custom keyword that go straight to the contents of a specific Saved Search. For example, I have a Saved Search called "TODO" which contains all files/folders tagged "todo". I have linked this Smart Folder to the keyword .todo in Alfred. See the included example and the help file for more details. More info There's a bit more info on the GitHub page and in the included help file (smartfolders-help). This workflow uses alfred.py by nikipore and docopt. All comments and feedback welcome. Changelog 2013-11-04 Now works on non-English Macs. Thanks to kopischke for finding the problem and the solution.
  4. Updated again today with new configuration/help keywords to stop them getting mixed up with the contact search results.
  5. That would definitely be a useful feature, and I'll have a think about how it could be best implemented. (The only idea I've had so far would entail a significant re-write.) As things stand, results based on contact names (not addresses) will show the email addresses in the same order as they are listed in Contacts, except the primary email address (the starred one) should always be at the top. So you could try making sure your preferred email address is the first one listed on the contact's card in Contacts. That would have the added bonus of having the same effect in Mail.app (unfortunately, other email clients aren't so smart). I realise that might mean a lot of mindless work if there are a lot of affected contacts, so I will see what I can do.
  6. I've added support for Groups. I'd appreciate feedback on whether or not it's still working for you (I had to change the DB access a lot).
  7. I've been thinking about this (it would be great to be able to sync things like API keys across machines). Could there not be an Alfred.alfredpreferences/workflow-settings subfolder in the Dropbox in which workflows can create folders named after their bundle id much like the cache and data directories? It wouldn't need to be actively supported by Alfred in any way (just a convention). Alfred would just need to not delete it. Dropbox takes care of the syncing, and a workflow's files will always be at ../../workflow-settings/my.bundle-id relative to the workflow's directory. Dropbox/Apps/com.runningwithcrayons.Alfred/my.bundle-id would be a more Dropbox-like alternative if syncing workflow settings, but not workflows or preferences, is desired. It certainly seems to be a much cleaner solution than keeping user data in the workflow directory itself. That would probably need a specific directory name (e.g. config or settings) that Alfred knows about and would have to be careful not to overwrite when upgrading workflows.
  8. I suppose it wouldn't be a problem having the screenshots and Readme in the workflow (I've been writing a separate help file). I guess I'd end up having the generated .alfredworkflow in there, too, as I use GitHub as the download location, too. I'm not so sure that's a great idea, though. Have you had any problems with .git directories in Dropbox? I don't think I'd like to try sorting out and Dropbox conflicting files in the git objects database.
  9. How do you guys and gals go about developing a workflow? Do you keep your code in your normal code directory and symlink it to Alfred's workflow directory? Or do you code in the workflow directory and then copy the files manually into a separate directory with source control? I've been trying the former, but it's causing problems with Dropbox syncing and git.
  10. Sure. That's kind of the whole point. I'll try to make that clearer in the original post. Be sure to TAB on a contact to add it to the list of recipients (not ENTER). The email will be added to Alfred's search field, plus a comma. Then just start typing the next name/email. TAB again to add that one, or hit ENTER (or ⌘+NUM) to add the selected contact and start composing your mail. I'm going to have a crack at contact groups next.
  11. Splendid. I've changed it again so it also includes the names of the folks you're mailing (if available), i.e. "Bob Dole <bob@aol.com>" instead of just "bob@aol.com". I'd guess this is the preferred behaviour. Please let me know if I've broken it again
  12. Righty. I tested it on another machine and it was (probably) just a really dumb coding error that wouldn't trigger on an OS install as crufty and old as mine. It should work now for Mountain Lion users. Possibly for Mavericks users, too, but I can't test that yet. I've uploaded a corrected version at the same URL.
  13. Thanks for responding. I pulled in so many results because I was interested in determining the performance hit of various kinds of post-search filtering. To be clear, I'm not convinced that excluding directories by checking to see if the filepath of a result starts with the path of the directory would create a great deal of overhead or complexity. And the lack of such a feature does create quite a bit of complexity in certain use cases. That said, I know little about how mds works (and nothing of Alfred's inner workings), and I can imagine situations where that might be a PITA, so I'll take your word for it. I have added a corresponding thread to the feature request forum, if only to see if any other users miss blacklisting as much as I do.
  14. Alfred should have the ability to exclude specific folders and filetypes from global and file-filter results, much like the file-filter include functionality, but in reverse. Alfred uses Apple's search API, which is include-only. This works well most of the time, but as a result, the only way to exclude files/folders from Alfred's results is to use Spotlight's privacy settings to exclude them from OS X's index, which means they're unavailable in Spotlight and any other app that also relies on the search system (HoudahSpot etc.). In many cases, this is not a viable option. There are many situations where Alfred's whitelist approach is a PITA or useless compared to a blacklist approach. For example, I have a lot of source code, which I regularly search using Spotlight, but don't want showing up in Alfred. It would be pretty simple to fix that with a global blacklist, but it's literally impossible without. Perhaps you want to include a directory in Alfred's global search, but exclude it from a specific file filter. Perhaps you want to use a file filter to search all filetypes or subdirectories bar one or two. But without blacklisting, you're forced to explicitly include every folder/filetype but the ones you want to ignore. If that isn't enough work, you need to update your file filter every time you add a new folder or new type of file. The problem is compounded by Alfred only displaying a limited number of results: you don't even get the chance to train it to associate a certain file with a keyword because the file never makes it into the list of search results.
  15. That's not going to happen. Alfred depends massively on OS X's indexing system and API. The chances of the devs replacing it with their own version are essentially zero, and the chances of their building a superior version if they did (given the available resources) are practically nil. And then you'd have two indexers running, which isn't going to help the performance of either. Your best bet is to hope that Apple continues to improve the performance of the system, as they have been doing since it was introduced. Do you remember how much slower it was when it first came out?
  16. I'm not really buying this. At least wrt excluding folders. That, at least, is a pretty trivial matter, especially compared to the things Alfred can already do. I've been playing around with mdfind in Python and benchmarking filtering the results. Even in Python, filtering the results doesn't present much of a performance problem. At worst, applying 10 globbing patterns to 30,000 results took ~400% of the time of the original Spotlight search. Excluding 6 directories took 10% as long (0.05 seconds) as the original search. Considering Python's speed vs C, the globbing might be borderline, but excluding directories is a no-brainer. It's also literally one line of code (at most 10 in a language without list comprehensions?). Implementing the GUI would be far more work. Here's the code I used. A means to exclude folders and filetypes both globally (I really don't want to see any source code in Alfred, for example) and in file filters would be, imo, a massive boost to Alfred's utility. If you had one of those vote-for-features things, this would literally get all my votes. It's the only feature I would want to add to Alfred (except perhaps undo when deleting stuff in Workflows). I've been mulling over what you said re "think in terms of what to include, not what to exclude", but in some situations, this is simply impossible wrt Alfred's global search, and massively impractical wrt file filters (including 100 folders/filetypes because I can't exclude 1).
  17. 2015-07-29: Version 2 released MailTo: Select multiple Contacts and/or Groups, and compose in your favourite email app Search your Contacts and compose an email to one or more recipients (or none) in your preferred email program. Also supports Groups. The main aim—versus Alfred's built-in, more comprehensive contact handling—is to make it fast and easy to select multiple recipients and especially groups. Features Search and add recipients from your Contacts database Send to Groups/Distribution Lists (they're the same thing) Also enter email addresses by hand Use any email client you want (uses system default as standard) Results prioritised by order of email addresses in Contacts Download/Installation Grab your copy from GitHub or Packal. Install in the usual fashion. Usage Keyword is @ @ + ENTER — compose a blank mail (no recipients) @ [part of name or email address] — search your Contacts for matches. You can also add email addresses not in your Contacts. ENTER/⌘+NUM — add selected email address to recipient list and go to email program TAB — add selected email address to recipient list and continue searching mailto — see and change current settings If you've entered an invalid email address, it will be removed from the recipient list when your email app is called. Supported apps In theory, MailTo should work with any email client (it uses the mailto: protocol). Tested and working with: Airmail 1 Airmail 2 Apple Mail Sparrow Thunderbird Postbox Airmail (email addresses only) Unibox MailMate Mailbox Beta (email addresses only) MS Outlook Google Chrome (if you've set a handler) Fluid single-session browsers Does not work with: Safari (it will just open your system default email client)More info Please see the documentation. Note on Groups When deciding which email address to use for members of Groups, MailTo will use the one you've specified, or then the primary email address for the contact (don't ask me how to set that; I haven't been able to figure it out), and then the first one in their list of email addresses. To specify which address to use for a contact in a Group, open Contacts and go to Edit > Edit Distribution List … Changelog 2013-10-31 Add recipient name when calling email client, i.e. "Bob Smith <bob.smith@example.com>" instead of just "bob.smith@example.com".2013-11-01 Add support for Groups Prioritise email addresses by primary status then order in Contacts Change ID (cache format has changed) Use MIT licence 2013-11-03 Change config keywords to mailtoconf and mailtohelp so they don't get mixed in with search results from the default mailto action.2013-12-03 Properly format the mailto: URL so workflow works correctly with MailMate.2013-12-06 Added built-in, app-specific support for the email clients listed above. They should now work flawlessly without any need to edit settings. Note: the settings format has changed, so all your settings (yes, both of them) have been reset. There should be no need to edit them if you're using MailTo with your default system email client.2014-03-24 Fix plist parsing problems.2014-09-13 Add support for Mailbox Beta Add new keyword @ 2015-07-29 Release V2 Supports more types of contact accounts Supports more email clients Users can add support for their own clients 2016-02-10 Add support for MS Outlook Add support for Airmail 2 Remove duplicates based on name and email address
  18. Thanks very much for the tip. That's certainly helped with a few cases, and definitely the most painful ones. I'd still prefer a .gitignore-style ability to exclude things from Alfred without excluding them from the metadata index. In the long run, it would save me a lot of time and effort not having to create a custom workflow for every search that throws up a lot of irrelevant stuff that I still want to access via Spotlight, HoudahSpot etc. Sometimes a blacklist is just a much better fit than a whitelist. For example: I have a directory tree of textbooks, articles, tests etc. that I'd like to be able search. There is one subdirectory containing OmniOutliner outlines, which is the only subdirectory and the only filetype I don't want to search. Because I can't exclude either, I either have to add every single sibling folder to the search scope or every other conceivable filetype to the file filter.
  19. Thanks for the new version. I changed the modifiers again, though, because I want new connections to open in new windows not tabs. That way, it always works, regardless of whether I have a window open or not. Easily changed. So, I've been testing the workflow. It is searching on both name and server, but I don't like the way it doesn't prioritise the favourite names, but it does sort results by them: If I just enter "d", my first two results are: Bad Certificate badcert.domain-starting-with-d.com Bob's Diskstation diskstation.local The following results do have names starting with "d". If I enter "ra" my results are: Downloads randy.home.lan Incoming randy.home.lan Media randy.home.lan ... ... ... ... Radreisekarte ftp5.gwdg.de So, the first result whose favourite name starts with "ra" is number 8. The previous 7 are on a server whose name starts with "ra". IMO, the favourite name should be prioritised over the server name. That's the name I chose because that's the name I want to use. I hadn't realised the important part of the workflow was in Python (I thought it was all AppleScript), so I had a poke about, and I've changed the filtering to the following: faves = zip(names, addresses, indexes) results = [] q = q.lower() for t in faves: # name if t[0].lower().startswith(q): results.append(t) for t in faves: # address if t not in results and t[1].lower().startswith(q): results.append(t) for t in faves: # in name if t not in results and q.lower() in t[0].lower(): results.append(t) for t in faves: # in addr if t not in results and q.lower() in t[1].lower(): results.append(t) feedback = Feedback() for name, addr, idx in results: feedback.add_item(name.decode("utf-8"), addr, idx + "," + str(len(indexes))) print feedback This prioritises favourite names over server addresses and startswith over contains. I wish I were smart enough to make it do the "PS = Photoshop" style filtering P.S. I love the way you set names, addresses and indexes using steps of 3. I'll try to remember that trick.
  20. Just installed this workflow. Very nice. One problem, though: the `configurepinadd` keyword input was set to "No Argument" and wouldn't work till I changed it to "Argument Required".
  21. I'm having a similar problem (loads of stuff showing up in Alfred that I don't want showing up in Alfred), but excluding the relevant folders from Spotlight is not an option. For one thing, there are dozens and dozens of folders (my Sublime Text 2 plugins for example), and for another, I often use Spotlight to search those files. Can't Alfred have its own blacklist? Preferably with wildcard support, much like .gitignore. Piggybacking Spotlight's preferences is sub-optimal simply because Alfred isn't Spotlight. I use Spotlight all the time to search large file trees that I really don't want showing up in Alfred (source code, usually), not least because Alfred only shows the first few results of a search, so the stuff I'm looking for gets dropped on the floor. Being able to add, for example, "*.py" to an Alfred blacklist would make Alfred a lot more useable without breaking Spotlight.
  22. How do you add a Spotlight tag? Is that a Spotlight comment or an OpenMeta tag?
  23. I like this workflow because it syncs across machines, which is important to me, but it's also a PITA because it's search algorithm is broken. As best I can tell, it searches first (or only) on the server's (S)FTP address, not the favourite's name. For folks like me, who have many sites on the same server, that's a PITA. I type "ftp d", and the top result is "Bad Certificate" (a site I set up to check whether software correctly verifies SSL certs), because it's on a server whose name starts with "d". That's not optimal behaviour. Also, I find that opening the favourite in the current session by default is suboptimal behaviour (if I didn't want the open session, I would have already closed it), but that's easily remedied in Alfred's UI by switching the modifiers.
×
×
  • Create New...