Fork me on GitHub

Safari Tabs workflow for Alfred 2.0

I have just created a small workflow to search for open tabs in Safari.

The workflow allows you to search all open tabs in all open windows and selecting a result will change to the tab and focus the window.

The workflow only includes one command:

  • tabs (query) Searches for tabs matching the specified query. Both name of the tab as well as the URL is matched. The query is optional and if no query is specified, all open tabs will be listed.

When ”hovering” over a tab in the list, you can use one of the following modifier keys or, of course, simply select the tab to bring it to focus. The modifier keys and their actions are listed below.

  • alt Creates a new e-mail with Mail.app in which the name of the tab is the subject and the URL is included in the contents.
  • ctrl Closes all tabs and windows but the selected tab.
  • cmd Closes the selected tab.

Download the Latest Version

Download the latest version of the workflow here.

image

Get the source code

The soruce code is available at GitHub. Make a pull request, if you make something great.

image

Movies workflow for Alfred 2.0

Search for movies, TV series and actors on IMDb and view detailed information for movies and TV series directly in Alfred with data pulled from OMDb.

image

The workflow is inspired by this workflow written by Robert Hovath. While the workflow developed by Hovath is great, I wanted to be able to search for actors and therefore I decided to create a workflow which pulls its information from IMDbs API.

However, the API provided by IMDb is unofficial and undocumented so I don’t know of any way to pull detailed information from them, so I ended up retrieving information for a specific movie from OMDb.

The workflow uses one single command.

  • m [query] Looks up a movie, TV series or actor matching the query.

If a movie or TV series is selected, detailed information will be loaded from OMDb and shown. The detailed information includes the option for watching plot summary and a poster in quick look, view a list of actors in Alfred and view a trailer on YouTube.

If an actor is selected, the corresponding IMDb website will be opened.

Download the Latest Version

Download the latest version of the workflow here.

image

Get the source code

The soruce code is available at GitHub. Make a pull request, if you make something great.

image

CloudApp workflow for Alfred 2.0

Seeing that no one has created an Alfred 2.0 workflow for CloudApp, I decided to make one.

image

Features

  • Two file actions to upload a file to CloudApp. One action uploads as a public file while to other uploads the file as privately.
  • View items recently uploaded to CloudApp and select one to copy the URL to the item.
  • Send a bookmark to CloudApp. This is practically a very cool URL shortener. Especially if you have your own domain attached to your CloudApp account.
  • You do make mistakes, right? And you don’t want those mistakes on the interwebs, right? Delete items which were recently uploaded. 

Commands

  • cloud Lists the recently uploaded files. Selecting one will copy the URL to the clipboard.
  • bookmark (url) Bookmarks the URL and copies the URL to the clipboard. This can be disabled in config.json.
  • delcloud Lists the recently uploaded files. Selecting one will delete the file from CloudApp.
  • And of course, files can be uploaded to CloudApp from the file actions.

Installation

The workflow is written in Python and uses pycloudapp by Luis Nell. Because I have modified this wrapper a bit to get private file uploads working, this is bundled in the workflow. You do however need to install poster which the wrapper uses. This is easily done using the easy_install command. If you don’t have easy_install installed (you probably do if you ever write Python scripts :-)), you can grab it here and follow the installation instructions.

Fire up a terminal and write:

easy_install poster

You’ll probably need to use sudo.

Now you’re ready to configure the workflow.

Either download the workflow (in the bottom of this post) or grab it from GitHub.

If you downloaded the workflow with a .alfredworkflow extension, you must change the extension to .zip and decompress the archive. This probably created a directory. If so, open it.

Now, copy the file config.temp.json and rename it to config.json. Fill in your username and password for CloudApp. Your username is probably your e-mail address.
The attribute ‘copy_to_clipboard’ defines whether or not the URL should be copied to your clipboard when a file has been uploaded or a bookmark has been created. You can disable this, if you don’t want that behaviour.

Now you’re almost done. Select all the files in the directory, right click them and choose “Create archive”. Change the extension of the newly created archive from .zip to .alfredworkflow. It is important that you do not archive the folder but only its contents.

Double click the file you just created and you’re done :-)

Download the Latest Version

Download the Alfred worklow here. Note that you cannot use the workflow without configuring it properly. Please read above.

image

Get the source code

The soruce code is available at GitHub. Make a pull request, if you make something sweet.

image

Tweetbot workflow for Alfred 2.0

I have quickly put together a workflow for Alfred 2.0 which allows for controlling Tweetbot from Alfred.
The workflow is written in Python and uses the Tweetbot URL scheme.

Currently, the following commands are supported. Parameters in brackets are optional and parameters in square brackets are required. When an account name can be specified and none is specified, the current account will be used. If two commands are seperated ”|” it’s because there are several ways to write the command and you should just choose one of them. E.g. ”tb rt” and ”tb retweets” is the same.

  • tb n|new|tweet (message) Posts a new tweet.
  • tb t|timeline (account name) Shows the timeline of specified account.
  • tb user [screen name] Shows the user profile of the user with the specified screen name.
  • tb m|mentions (account name) Shows the mentions for the specified account.
  • tb rt|retweets (account name) Shows the retweets which appears in the accounts timeline.
  • tb dm|directmessages|messages (account name) Shows the direct messages that the account has received.
  • tb l|lists (account name) Shows the lists that the account owns.
  • tb favs|favorites (account name) Shows the tweets the account has marked as favorited.
  • tb s|search (account name) Searches using the specified account. (Note: Sadly this doesn’t seem to work with the ‘query’ parameter on OS X)
  • tb f|follow [screen name] Follows the user with the specified screen name.
  • t u|unfollow [screen name] Unfollows the user with the specified screen name.

Currently, the following commands are supported. Parameters in brackets are optional and parameters in square brackets are required. When an account name can be specified and none is specified, the current account will be used. If two commands are seperated ”|” it’s because there are several ways to write the command and you should just choose one of them. E.g. ”tb rt” and ”tb retweets” is the same.

I have used Tweetbots icon as the icon for the workflow. I really hope this is cool with Mark Jardine (@markjardine) who drew the icon for Tweetbot for OS X. I have used the icon for the workflow so that the actions are easier recognized when searching in Alfred. (Mark, if you’re reading this - tell me if you want me to change it)

image

Download the Latest Version

Download the Alfred worklow here. When downloaded, just double click the workflow and it will open in Alfred.

image

Get the source code

The soruce code is available at GitHub. Make a pull request, if you make something awesome (and you probably do!) :-)

image

YouTube workflow for Alfred 2.0

The beta of Alfred 2 was released yesterday. The beta includes advanced workflows with the option for returning results to Alfred and display them to the user.

I wanted to play with this and decided to write a workflow which searches YouTube. Having the results shown in Alfred makes it quick and easy to search for videos.

image

Typing youtube followed by a query will show the results for the query. The below input will search for Rebacca Black videos.

youtube rebecca black

Below is a list of the commands that the workflow provides. Parameters in brackets are required.

Commands

  • youtube (query) or yt s|search (query) or yt (query) Searches YouTube for videos matching the query.
  • yt c|channels (query) Seaches for channels.
  • yt cv|channelvideos (query) Shows videos for the specified channel.
  • yt toprated Shows the top rated videos.
  • yt topfavorited Shows the most favorited videos.
  • yt mostviewed Shows the most viewed videos.
  • yt mostpopular Shows the most popular videos.
  • yt mostrecent Shows the most recent videos.
  • yt mostdiscussed Shows the most discussed videos.
  • yt mostresponded Shows the videos with most responds.
  • yt recentlyfeatured Shows videos which have recently been featured.

If you find yourself having a hard time remembering the commands, remember that they will show up in autocompletion if you type yt.

Download the Latest Version

Download the Alfred worklow here. When downloaded, just double click the workflow and it will open in Alfred.

image

Get the source code

If you are interested, you can also grab the source code at GitHub. Hey, if you make something cool, make a pull request! :-)

image