UPDATE: See below for updates and changelog.
I’ve been playing around with Ubiquity since the day it came out, and I’ve been working on making some routine tasks easier with it.
This time, its a currency conversion command that will get the current approximate value of one currency in terms of the other that you enter. An example command that will convert, say, 10 USD (American dollars) to PKR (Pakistani rupees) is:
currency 10 USD PKR
This will then give you the result right in the Ubiquity window, with no need to open a new tab.
I wanted to use XE’s Universal Currency Converter (UCC) but their terms of use, as I understood they do not allow for automatic extraction of data from their site.
This command currently uses Google’s currency converter from iGoogle; be sure to read the disclaimer, as well. If you have a suggestion for a better alternative, I’d be glad to hear it!
To be able to use this command, you need Ubiquity installed and also have to ’subscribe’ to this feed. Click here, and Ubiquity will present you with an information bar across the top of the window; clicking on the “Subscribe” button will add this command to your subscriptions and you can then start using it right away.
Here’s a screenshot of the Ubiquity command window using this command (old version);

As with all other Ubiquity commands, typing in just part of the command is sufficient for it to understand what you mean — but this, of course, depends on what other commands you have that start with the letters “curr”. You can also take a look at the source code. Let me know what you think!
Updates
- July 11, 2009
- Added support for Ubiquity 0.5 (and its new parser). This command feed will continue to support both the old parser (Ubiquity 0.1.9) and the new one (version 0.5) until the developers decide to push out the automatic update to Ubiquity version 0.5.
- The currency converter can now also be used with the command converter.
- Planned feature: detection of currency symbols such as $, €, £, etc.
Sep 8, 2008 at 5:42 pm
This works really well. I don’t see why using xe.com would make a huge difference. The only thing that makes this a little hard to use is that one needs to know the 3 letter combination of currencies. But that’s not really your fault
Nice script.
Sep 9, 2008 at 8:47 pm
Hey Summer,
Thanks for the comment!
I wanted to use XE.com because they have a much larger list of currencies in their Universal Converter. Plus, their rates are more current and people might find that more useful.
But then again, this isn’t meant to replace anything and I only threw it together to make things easier, so I don’t think that’s a real big issue! Google’s converter does alright for the basic stuff.
Glad you like the command!
- Waleed
Sep 11, 2008 at 7:15 pm
Hey Waleed
)
Good going! The first script I looked for after installing Ubiquity was an fx script, and yours works perfectly.
Feature suggestion: can you make it check for any selected text on the current page, and use that as the source currency amount? Perhaps coupled with a default target currency that you can save as a user pref somehow… (is that possible with ubiquity? I’m just getting to know it!)
I’m always browing the web and converting [eg] USD back to GBP, so it would be handy to be able to just select the dollar figure amount on the page that I want to convert and then hit – to bring up the converted rate in GBP.
Just my 2¢ – er – 1.14p
Sep 18, 2008 at 3:19 pm
Works a treat. Thanks. If you are looking for a new idea then what about “Index Country Name” that just looks up the stock index. That would save me 20 mins a day. Thanks for the FX.
Nov 18, 2008 at 9:55 pm
I’m not getting a return when using your script. The exact conversion I am trying is:
“currency 270 CDN USD”
I’ve had no luck with any other conversions.
I’m on OS X 10.5 using FF 3.0.4
Nov 20, 2008 at 11:00 pm
Hi Am,
I’m assuming you’re trying to convert between Canadian and US dollars, but the symbol for Canadian dollars is CAD, not CDN.
I’m using the Google Finance converter, so you can take a look at the dropdown menu there to see what the symbol is for the currency you want.
Hope this fixes it!
Nov 23, 2008 at 12:52 pm
Thanks, but why not use the free-text currency conversion that Google offers? You can type “$5 in NIS” in the Google search box, for example, and get the value of five dollars in new Israeli shekels.
Also, if you type “30 GBP” in the Google search box, you get the value of 30 Great Britain pounds in dollars (even though you didn’t type a target currency).
Note that for the Israeli shekels, for example, Google search box accepts “NIS” and “shekels” as well as “ILS”, while the finance converter only accepts “ILS”.
This is why I still prefer copying currency figures I see in pages into the Google search box in my Firefox toolbar, over using this Ubiquity command over it. However, this will change if the “currency” command uses the great Google engine in the search box.
Nov 23, 2008 at 3:48 pm
Daniel,
Thanks for the suggestion!
I like the flexibility of the Google search currency converter tool, too, but I’ve been unable to figure out a pattern to base the queries I send it upon. For example, the “30 GBP” or “30 shekels” format works, but not for all currencies (just the most popular ones I suppose).
I could make a separate Ubiquity command that just converts just to USD using the Google search box and accepts all variances of a currency name?
But the Google search does make things more convenient, so I could put in some sort of error checking, where it would test the search box for a result first, but if no answer was found, it would fall back to the finance converter. But with that there could be an inconsistency with what the user has put in (maybe “shekel”) and what the Google finance converter can understand (”ILS”).
What do you think?
- W
Jan 31, 2009 at 8:57 pm
Any conversion I try results in ‘No Action Defined’. Is this script still working?
I don’t know what I could be doing wrong. I type your example exactly and get no results.
Feb 1, 2009 at 1:55 pm
Seems to be working fine for me, physio. Could you unsubscribe and resubscribe from the about:ubiquity page and then try again?
Also, when you type currency, is the Ubiquity window correctly highlighting the right command?
Apr 4, 2009 at 8:39 pm
Thanks for the command. I bet people know country codes more reliably than currency codes, a table that would automatically convert country codes to currency codes might not be a bad idea (i.e. 30 fi usa would be treated same as 30 eur usd). Not sure though if there are conflicts between country and currency codes…
Apr 4, 2009 at 9:10 pm
Thanks for the suggestion Ville, I’ll look into it. I think you’re right though, country codes are more well known than currency codes.
May 22, 2009 at 6:17 am
Great work Waleed.
+1 david ’s feature suggestion, to avoid having to copy/paste the amount onto the ubiquity window all the time
also would be great if it had the ability to cope with digit grouping.
finally, a bit trickier to implement, but very useful would be the ability to issue a command that replaces all the monetary values on the pages (i.e. all numbers prefixed by $, €, US$, USD, etc) with their corresponding converted values
Jul 10, 2009 at 5:07 am
anyone else having issues with this at the moment?
mine has stopped working completely.
Jul 10, 2009 at 10:02 pm
unfortnately it doesn’t work with latest ubiquity
is it using the old API?
Jul 11, 2009 at 7:30 pm
I’ve updated the script, it should work with Ubiquity 0.5. Let me know of any problems!
Ubiquity and Ping.fm
Jul 13, 2009 at 2:20 am
[...] this Ubiquity to Ping.fm command? You might also like my currency converter for Ubiquity – check it [...]
Jul 14, 2009 at 2:53 am
I’ve tried reinstalling this command, but I continue to get a message that it’s unsupported because it uses the old API.
Jul 14, 2009 at 6:31 pm
Hey Richard,
Could you try this:
- Go to chrome://ubiquity/content/cmdlist.html
- Unsubscribe from this command, and then under the “Unsubscribed Feeds” heading, look for the purge link beneath the entry for the currency converter. AFAIK that clears it from the cache.
- Resubscribe to the command from this page
Also, some of Ubiquity’s built-in command feeds haven’t been updated to support the new API yet. I get a toaster-style notification about that every time I open a new window, so it could be those commands Ubiquity is notifying you about.
Let me know if that fixes it!
Jul 14, 2009 at 9:45 pm
Awesome! That fixed it—Thanks!
Jul 15, 2009 at 9:26 pm
Hum, maybe I spoke to soon. I’d swear it worked when I first tried it, but today I restarted firefox and got the warning message again. The command list now shows the currency command as disabled because it uses the old API.
I tried the steps again a couple of times, and each time when I readd the command, it flags it as an old API command.
Jul 15, 2009 at 9:46 pm
That’s mighty strange! Could it be because the file is supporting both the old and the new parser?
Here’s a separate file that’s only got the command for the new API – try subscribing to that from here: http://waleed.doubleudesigns.com/code/ubiquity/currency.html
Also, you’re using Ubiquity version 0.5 right?
Jul 15, 2009 at 10:14 pm
Thanks. That appears to be working better now. I installed the 0.5-only version and it looks fine and restarted Firefox just to be sure and no warnings this time.
But I don’t see any results in the Ubiquity window. If I hit ENTER it will open a new tab with the results, but I can’t get any results to show inside Ubiquity.
Jul 15, 2009 at 11:01 pm
Hey Richard,
Thanks for pointing that out! I’ve updated the feed again. Turned out Google moved from tables to divs!
You might need to go through the unsubscribe-purge-subscribe cycle again – seems Ubiquity isn’t very smart about refreshing command feeds once they’ve been updated.
If that doesn’t work, you’ll have to resort to a cache clear and browser restart.
Thanks for the patience!
Jul 15, 2009 at 11:23 pm
Looks like it auto-updated. I restarted Firefox and it works great now. Thanks for all of your help.
Jul 16, 2009 at 7:30 pm
That’s great! So which feed are you subscribed to now? The one from this page or the one from here?
Jul 16, 2009 at 8:25 pm
The one from “here”.