David Ferguson

RSS

Posts tagged with "Alfred"

Weather Workflow for Alfred 2 (beta) - Coming Soon

Just a teaser for now. I still need to test a few things and don’t have time today, I have a few other things to work on so I should get this completed this week though hopefully.

I may also put out an update to AlfredTweet this week if I get time to work on the authentication stuff some too. It won’t be complete yet, but it will get you by for now.

A Few Alfred 2 Workflows to Get You Started

So, these may not be top quality yet because I’ve been spending a lot of time figuring things out, learning the ins and outs of the new workflows and such. I wanted to go ahead and share a few just to get you guys started and give you something to look at in the new beta of Alfred. So check these out, let me know if there are any bugs and such. I’ll get things cleaned and such soon.

Also, apologies, I still have a few things to clean up in AlfredTweet. It will be ready soon though, I promise :)

Chrome Bookmark Search

Google Auto Complete

Rdio

Search Mail.app

Also, sorry about the size of the Rdio extension. It’s from all of the icons. I’ll trim it down soon.

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. 

Thoughts?

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

Jan 1

Wunderlist 2 for Alfred Info

Don’t get excited just yet. I just wanted to write a little note to let you guys know that I am working on getting this working again. The old version of Wunderlist used a local SQLite database that was named differently and I believe in the different location than the new database. I’ve been poking around at it this morning. The new database is located at ~/Library/Application Support/Wunderlist/WKModel.sqlite if you want to look at it as well. Obviously, be careful :) Task and list information is stored in the ZRESOURCE table with the ZCLIENTID field making the distinction between the two types. You can query the tasks locally using sqlite3 by doing something like this at a prompt.

sqlite3 ~/Library/Application\ Support/Wunderlist/WKModel.sqlite “select a.Z_PK, a.ZTITLE, b.ZTITLE from ZRESOURCE as a JOIN ZRESOURCE as b where a.ZCLIENTID like ‘%:Task:%’ and b.Z_PK = a.ZTASKLIST”

That would give you a list of all tasks (even completed) along with their id and the name of the list they belong to. Hopefully when Alfred 2 comes out I can use stuff like this to populate the result list and allow you to action results like this.

If you wanted to only grab a list of items that have not been completed you could add one extra clause to the query. It would be modified to be..

sqlite3 ~/Library/Application\ Support/Wunderlist/WKModel.sqlite “select a.Z_PK, a.ZTITLE, b.ZTITLE from ZRESOURCE as a JOIN ZRESOURCE as b where a.ZCLIENTID like ‘%:Task:%’ and b.Z_PK = a.ZTASKLIST and a.ZCOMPLETEDAT is null”

Anyway, just wanted to let you guys know that I am looking at it and am going to contact someone in the Wunderlist team. They keep referencing an api.. I want access to it :)

Also, one last note, once again, this is directly editing the sqlite database that Wunderlist uses and therefore, when you change something, it isn’t reflected in Wunderlist if it is open. It won’t show up until Wunderlist is restarted. That’s one of the reasons I would like to get api access so I can hopefully find a better path to integrate with Wunderlist and get things working a little more smoothly.

New Add to Pocket from Alfred

I quickly made a new extension to send links to your Pocket account from Alfred today. This extension requires the most recent update to Pocket for Mac to work. This extension is a little different than the other because it actually uses the native app to add the url and not the web service. The most recent update to  Pocket for Mac added a new url scheme pocket:// that allows for adding urls natively. 

I havne’t done a lot of thorough testing on it so if there’s an issue with it, let me know and I’ll get it fixed asap.

Download it here

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.

Download

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.

Note:

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.

Download

Updated Chrome to Safari Sync video with audio. Provides more details on how it works, and answers a few questions you guys have had. Enjoy.

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.