Archive for April, 2009

A pipe as a Firefox custom search engine

April 28, 2009

There’s a pipe I often use before I reply to a tweet. It shows me recent tweets from and to a Twitter user. There’s no point in replying to someone if they’ve already received a reply that contains the same information.

While using the pipe I began to wonder if I could set it up as a Firefox custom search engine. A quick web search sent me to this article on Wikihow. It looked simple enough – just create a small text file in the Firefox searchplugins directory and that’s it.

After a small amount of experimentation this is what I came up with:

<search
name="Twitter user"
method="GET"
action="http://pipes.yahoo.com/hapdaniel/rnqt_6gE3hGtLKkw_w6H4A"
queryCharset="utf-8">
<input name="user" user>
</search>

There’s a couple of things to notice here. Firstly, in the pipe I have a Text Input module that has the name “user”. If the name had been “tweeter” then the input tag would have been <input name="tweeter" user>. Secondly, don’t try using the pipe link format http://pipes.yahoo.com/pipes/pipe.info?_id=pipeid since the query generated for the search assumes that the search term parameter is going to be the first parameter. You’ll end up with a query that looks like http://pipes.yahoo.com/pipes/pipe.info?_id=pipeid?user=”fred”, which won’t work.

I found that I needed to restart Firefox in order for my search engine to show up.

Update – Sorry folks, but I’m a blogging novice. I’ve changed the link to the original article I mentioned because the original article was updated and simply didn’t reflect what I was talking about. So lesson one is not to link to anything that starts “Wiki”. For now I’ve changed the link to point to the version of the page I was talking about. My second lesson is to realize that the characters I type in when editing a post are not necessarily the characters that will appear on the blog. My simple quotes appear as fancy quotes, so it means that a copy and paste on the text for my search engine does not work.