David Ferguson


Posts tagged with "extensions"

Jan 2

AlfredTweet 2 Authentication

One of the things I hate the most about AlfredTweet is the authentication mechanism. I don’t like that I have to send you to Twitter to log in, grab a code, then make you come back and enter the code into Alfred for storage. Maybe I could use xAuth to authenticate to Twitter to make it a little easier, but I also don’t like the idea of having to ask for your password. I would never do anything malicious like try to steal your password or anything like that, but still.. I wouldn’t feel comfortable just giving my password out in an extension so I don’t really expect you guys to want to do it as well. So how am I going to handle this? Well there are several options and I could potentially offer several in AlfredTweet.

Option 1

The first option is the easiest and that is to just keep the current authentication method. This would keep authentication with Twitter.com. This already works, and I’ve actually done a few things to make it a little bit of a smoother process.

Option 2

This option would consist of me trying to work in xAuth authentication to Twitter. xAuth consists of AlfredTweet getting your username and password to Twitter and sending a request to Twitter.com with that information and getting your auth tokens. Once I get the auth tokens, save them for later and that is what is used to interact with Twitter. As mentioned earlier though, I don’t like the idea of asking for your username and password. One potential solution would be that, instead of asking for your username and password in Alfred, I could use Don Southard’s (@binaryghost. Don’t know him? Follow him now. Seriously, now.) Authenticator app. Using Authenticator would ask for your username and password and store it in your OS X Keychain. I could then use Authenticator to grab the username and password, authenticate to Twitter, grab your auth tokens, save them back to the keychain and then delete the keys that have your username and password in them. So this just gives you a secure way of entering your username and password until I get done with the authentication. This isn’t exactly my preferred method but, I want to make things easy for you guys.

Option 3

This is my favorite method, but it has a downside. This method requires Mountain Lion. This option will request keychain access and check to see if you have your auth tokens stored in the keychain already. Why would they be in there? The Twitter integration that is baked into OS X stores your auth tokens in the keychain. So, if you had your Twitter account set up in Mountain Lion you could simply perform a “local authentication” that would grab your auth tokens from the keychain and be done. No website, no entering in codes, usernames, passwords, etc. There would only be a prompt saying that I wanted to grab the info from your keychain and then setup is complete. 


What would you like to see or what would you prefer? Send a tweet, let me know.

PHP Extension Utils

So I know I am probably a rare bird and probably one of the few people that actually make Alfred extensions from PHP scripts. I like PHP, it’s powerful, it has functions to do everything under the sun, and there’s tons of documentation and examples in case you run into something you’re unsure how to accomplish.

I find myself recreating the same functions and doing a lot of the same things in a lot of my extensions so I decided to build a little PHP class that I can include and start reusing to perform a lot of the tedious things that I reuse over and over. I’ve made several functions so far that I can use to: execute cURL, convert arrays to XML, convert JSON to XML, read data from a plist, save an array of data to a plist, etc. I’m going to continue adding functionality to this and will eventually put it up on github or something similar as well for other people to add to, correct, etc. I’ll also post it for people to download it and use in their projects or extensions. If you develop extensions in PHP as well, what other functions do you think would be useful when creating extensions in Alfred? Send me some recommendations on Twitter (@jdfwarrior). I’d love to hear what you guys think.

I may go back at some point and try to built something similar in Python as well. I may even learn a little ruby or something so I can make the library available for developers of several different languages. If you are fluent in some of these languages, perhaps you could get in touch with me and help me get a jump start on this. If you want to help out, once again, get ahold of me on Twitter or email (jdfwarrior at gmail).

Searching Transmit Favorites with Alfred

I noticed on the Alfred Get Satisfaction page that there is a post about wanting to search Transmit favorites in Alfred. I had made an AppleScript before that would open a favorite but the downside to that was that it had to be typed exactly. This extension will allow you to actually search the favorites and the connect history of Transmit in Alfred.

The keyword for the extension is “ftp”. This can be changed of course. To search your favorites type “ftp <search term>”. Results show up in the Alfred results list.

Download it here

Searching Email with Alfred

A lot of people forget about the ability to create search filters in Alfred. They can be really powerful. Vero (@vero) got me to look at one a bit ago for searching Outlook. After getting it created, I wondered if I could do the same thing with Mail.app since what I default to since SPARROW SOLD OUT. Sorry :) Anyway, here are the two filter extensions for searching Mail and Outlook.

These should allow you to search your client of choice by subject, author name, author email, or within the content.

I may end up looking at a few other mail clients to do the same thing. Or, if someone else beats me to one, let me know and I’ll add it (the link) to this post and credit the author for it.

Download Outlook Mail Search

Download Mail.app Mail Search

Searching Notes with Alfred

Want a quick way to search Notes.app notes from Alfred? Create a Search Filter extension.

If you create a Search Filter extension that only shows results of the .notesexternalrecord file type, and then add kMDItemTextContent as an additional metadata field, you can easily search your Notes directly from Alfred. When you press Enter, the note will be opened in a stand alone window (see the screenshot above).

If you aren’t sure how to add the metadata field (it allows Alfred to search the file contents as well, not just the title), then don’t worry. Click here to download a pre-made filter. ‘Notes’ is the filter’s keyword. 

PS. Don’t forget the bacon.

Syncing and searching Pinboard bookmarks in Alfred.

More info to come.. I may finish this and pass it off to @binaryghost for distribution with his Mac app, Thumbtack. For more info on Thumbtack, check it out on Twitter (@thumbtackapp) or visit Thumbtackapp.com

Creating reminders in the Mountain Lion Reminders app via Alfred.

It’s not 100% natural language because it has to have a period to separate the task and the reminder time and it also gets a little quirky on the times (depending on what you enter), but it works for the most part. It works for times like “20 minutes” as well.


Chrome Bookmark Import for Alfred

Chrome Bookmark Import for Alfred

This extension is one of two that I will be releasing to work with Chrome bookmarks. This one will read your Chrome bookmarks and will import all of those URLs into the URL / History function of Alfred.  This may sound like a silly extension but it’s purpose is to make it so that Alfred will search Chrome bookmarks since Alfred only currently supports Safari bookmarks. This extension will need to be run occasionally if you want to keep it up to date. 

The other extension that I am working on will let you sync all your Chrome bookmarks into Safari and will allow you to set an interval on which the script runs and updates the bookmarks so your Chrome bookmarks will always be searchable by Alfred.


This extension works on a set path. If you are using a different Chrome profile or the path for the Alfred for the Alfred history database is somehow different, you will need to find that path to those files and adjust their path in the script.php file. The path to the two objects is at the top of the php file.


Update on the Chrome to Safari Sync extension.

It will now check to see if the Chrome bookmarks file has changed, if not, it won’t touch Safari.

I also got the auto updating working. You’ll be able to set the update interval. I had it set to 10 seconds in this demo, that’s why there is a bit of a lag between the time I save a bookmark and when it shows up in Safari.

I’m still tweaking some stuff on this one but hope to get it done soon. Keep watching here and Twitter for updates.

Another extension for synching Chrome bookmarks. This one will allow you a way to sync your contacts from Chrome to Safari so that the bookmarks can be searched by Alfred. No more Xmarks. :) The only downside to this is it will need to be run occasionally. It could always be modified to run on an interval to keep them synced. I’ll post on that later.

Wunderlist Extension

I honestly don’t “check” my Tumblr stuff often. I primarily just use it to post and forget. I just noticed I have several messages from people asking for help with the Wunderlist extension, saying that when they installed it, it couldn’t find the database. I haven’t touched the Wunderlist extension in a while but I will try to get back into it sometime within the next week or so and see if I can make it more accurate at detecting the path to the database. I actually don’t remember how I was doing it originally, but I may see if I can’t work some extra magic with mdfind and such to see if I can use Spotlight to actually find it, and then set the path that way.

So, if you were having trouble with the Wunderlist extension, keep watching here for an update and I’ll try to get things fixed.

A short preview showing one of the changes in the upcoming version of AlfredTweet. The mentions and tweets command now splits the output into multiple growl notifications and uses the users profile image as the notification icon. It also shows their name in the title of the notification instead of showing “AlfredTweet”.

Quick little tip/trick showing how you can send urls to Pocket a little easier using selected text.

To see the original demo video for the extension or to download Drop in Pocket, click here

Drop in Pocket extension allows you to quickly save a URL into Pocket.

Bring up Alfred, and type ‘pocket setup’ to set your Pocket credentials. This will only be done once, credentials are stored in the keychain.


For a quick tip on how you can add urls using selected text with Alfred, click here