Jump to content
designandsuch

Workflow: Units - convert currency length temperature weight and more

Recommended Posts

You're absolutely right, I'm still adding values and improving some features ( better special character handling, smarter interpretation, improved logic etc ).

 

The old version is 'at this point in time' more useful in general, because it simply has more units.

I would encourage people to download the new version though, because this one will get all the old + the new units eventually.

 

*I added the bath into the new version in my attempt to win you over :P

 

Hey, I am won over! Thanks for the inclusion. It is working great! Thanks.

Share this post


Link to post

Added support for 90 different currencies: 

 

0_5_currency.png

The currency rates will automatically update themselves every day based on:

http://finance.yahoo.com/currency-converter/ 

 

if you have version 0.5 you don't have to update to start converting with these new currencies.

 

They can all be accessed by ( at least ) their natural name or abbreviation ( United stated Dollar - USD ).

 

 

US Dollar
Euro
British Pound
Thai baht
United Arab Emirates Dirham
Australian dollar
Argentine Peso
aruban florin
convertible mark
barbadian dollar
Bangladeshi taka
bulgarian lev
dinar
bermudian dollar
boliviano
brazilian real
Bahamian dollar
canadian dollar
swiss franc
chilean peso
renminbi
colombian peso
czech koruna
danish krone
egyptian pound
fiji dollar
Ghana cedi
Gambian dalasi
guatemalan quetzal
Hong Kong dollar
croatian kuna
hungarian forint
indonesian rupiah
israeli new shekel
indian rupee
icelandic krona
jamaican dollar
jordanian dinar
yen
kenyan shilling
cambodian riel
south korean won
kuwaiti dinar
Lao kip
Lebanese pound
sri Lankan rupee
Lithuanian litas
Latvian lats
Moroccan dirham
Moldovan leu
Malagasy ariary
Macedonian denar
Mauritian rupee
Maldivian rufiyaa
Mexican peso
Malaysian ringgit
Namibian dollar
Nigerian naira
Norwegian krone
Nepalese rupee
New Zealand dollar
Omani rial
Panamanian balboa
Peruvian nuevo sol
Philippine peso
Pakistani rupee
Polish zloty
Paraguayan guaraní
Qatari riyal
Romanian leu
Serbian dinar
Russian ruble
Saudi riyal
Seychellois rupee
Swedish krona
Singapore dollar
Syrian pound
Tunisian dinar
Turkish lira
New Taiwan dollar
Ukrainian hryvnia
Ugandan shilling
Uruguayan peso
Venezuelan bolivar
Vietnamese dong
CFA franc
East Caribbean dollar
West African CFA franc
CFP franc
South African rand

Edited by designandsuch

Share this post


Link to post

What about negative values?

 

Unable to see results for qurey:  units -30c f

 

Thanks!

 

Off course! you're right.. how did I miss that.

 

Anyhow i fixed it, thanks for your input and a Merry christmas.

 

0_5_minus.png

Edited by designandsuch

Share this post


Link to post

I just finished my Alfred emulator for Units. I would like to embed it on this page, but unfortunately this forum doesn't allow iframes.

So i'll have to redirect you to this page : http://time.designandsuch.com/units/docs

 

try out the demo

 

It's not as solid as the real Alfred experience, but gives a pretty good example.

Edited by designandsuch

Share this post


Link to post

As you guys might have been noticing there where some icons missing.. since i added a lot of new units in the last weeks. Which seems to work perfect by the way.. I have been fixing bugs basically every day.

But for the Icons I needed you to re-download the actual workflow, which you will be reminded of automatically if you have the latest version.

 

Here's a quick overview of the new icons.

 

0_6_icons.png

Share this post


Link to post

Thanks Scott!

 

I'm glad so many people appreciate Units, it encourages me to keep making it better.

Saying that, I would also encourage people to keep sending me request for additional units and features.

Share this post


Link to post

Thanks for the wonderful plug-in designandsuch! It really makes the tedious process of converting to and from a snap.

 

If I could submit one small request - when converting a unit to feet, it would be quite helpful to be able to view the results in feet and inches. For example instead of "Units 222cm Feet > 7.28346... Feet" the output of "Units 222cm Feet > 7 Feet 3.4 Inches" would be be quite a bit more useful for most casual unit conversions.

 

 

Thanks Scott!

 

I'm glad so many people appreciate Units, it encourages me to keep making it better.

Saying that, I would also encourage people to keep sending me request for additional units and features.

Share this post


Link to post

This is awesome, would it be possible to create a convertion Minutes to hours?

I have to log my time in hours, and I'm currently looking for a solution within alfred to to this. This is by far the best coverter, but time only seems to go down, eg Mins > Secs. 

Share this post


Link to post

This is awesome, would it be possible to create a convertion Minutes to hours?

I have to log my time in hours, and I'm currently looking for a solution within alfred to to this. This is by far the best coverter, but time only seems to go down, eg Mins > Secs. 

 

Hi Robgill, you already can do just that.    

"  units 5 min h  "   =  0.083 hour

or

" units 5 minutes hour " = 0.083 hour

Share this post


Link to post

Great workflow. It works like a charm:) I strongly reccomend this extension as a currency converter:)

Share this post


Link to post

Great workflow!

 

Requests:

 

1. How can I disable the "About" "documentation" that appears when I type the keyword?  I would strongly prefer if it said "Units" "Convert units" or something like that.  Can the link be disabled too?

 

2. There seems to be no circle icon.  Can you put one in?

Share this post


Link to post

Great workflow!

 

Requests:

 

1. How can I disable the "About" "documentation" that appears when I type the keyword?  I would strongly prefer if it said "Units" "Convert units" or something like that.  Can the link be disabled too?

 

2. There seems to be no circle icon.  Can you put one in?

 

 

1. I understand some people might not like the idea of a link within the workflow. But this is a very subtle one, and it serves a purpose. Since Alfred is such a minimal interface it would be really hard to supply users with a way to find the documentation - if they want to check if a feature exists for instance. Therefor I am reluctant to cut out the link to the documentation. I know the documentation isn't the sexiest at the time but it will improve over time and at it does do the job. ( You can easily disable it for yourself by cutting the cord to the osascript in the workflow though, even though it might break some other external link features ). 

 

About the title.. no pun intended, 'About' obviously corresponds to its function. So I don't see a clear reason why it should say something else. I can change it though.. what if I change it to 'About Units'?

 

* I am working on a way to let the user set certain custom settings, but I haven't figured out which settings would be desired and how to implement this exactly. Suggestions are always welcome. 

 

 

2. There actually is an circle icon, maybe you aren't using the latest version. if you type 'units version' it should return 'you are using the latest version'.. it's pretty self explanatory actually :)

This should fix the circle issue.

Share this post


Link to post

This really is great, thanks!

 

One thing that is very convenient with the new Yosemite Spotlight, though: you can simply start typing e.g. "35000 isk to eur" (to get the amount of Euros in 35000 icelandic krona) without the need of an arbitrary keyword. Would this even be possible with Alfred's workflows?

Share this post


Link to post

You can actually do that.. 3500 isk eur

I haven't made support for the 'to' word stupidly enough. I understand that it's something people naturally will try. So it's on my todo list

The new spotlight is fun, but I think every heavy Alfred user will confirm that it's not close to a replacement for Alfred. I saw the converter options in spotlight and they are nice but I will keep working on Units because I think it still has the potential to be better than the spotlight version :)

edit: just read your post again, and you are aiming towards the lack of a keyword. That is actually possible but I think it might become to invasive of an worklow in that case, since it would almost always pop up. There are over 300 units in the workflow already so ever first character shows something. I might try it out actually *just thinking out loud now. Plus you can always change the keyword to something shorter manually

Edited by designandsuch

Share this post


Link to post

edit: just read your post again, and you are aiming towards the lack of a keyword. That is actually possible but I think it might become to invasive of an worklow in that case, since it would almost always pop up. There are over 300 units in the workflow already so ever first character shows something. I might try it out actually *just thinking out loud now. Plus you can always change the keyword to something shorter manually

 

Right, that's what I was asking about, sorry for the confusion post... :-)

A similar converter workflow does not use a keyword and at least in my experience it's not too invasive. For now I have simply changed the keyword to "u", but leaving it out would feel more natural to me.

Share this post


Link to post

Right, that's what I was asking about, sorry for the confusion post... :-)

A similar converter workflow does not use a keyword and at least in my experience it's not too invasive. For now I have simply changed the keyword to "u", but leaving it out would feel more natural to me.

 

If you want to start typing just like that you can do so so by tweaking the workflow like this.

 

1) right click and copy the Script Filter 

 

2) Double click the new Script Filter to change some settings

 

3) change the keyword to "1" and untick "with space"

 

4) now in the actual script box change units("{query}");   to  units("1{query}");

 

5) Do the same for the numbers 2,3,4,5,6,7,8,9,0

 

6) Connect every Script filter to all the other nodes 

 

After this Units will start off the moment you type a number.

This is the same way that other workflow works.

One drawback of this that the suggestions don't work that well anymore.

so when you type 10 kil the workflow will suggest kilometers, kilos, kilogram, kilobyte etc.

but the prefix 1 will be added since that's your keyword now. so when you choose any of the suggestion

you would get something like 110 kilogram. I can fix this in the mechanism but I will try out the keywordless version for a while

to see if it will work smoothly. After that I will fix these new issues.

 

and thanks for the input!

Share this post


Link to post

If you want to start typing just like that you can do so so by tweaking the workflow like this.

 

1) right click and copy the Script Filter 

 

2) Double click the new Script Filter to change some settings

 

3) change the keyword to "1" and untick "with space"

 

4) now in the actual script box change units("{query}");   to  units("1{query}");

 

5) Do the same for the numbers 2,3,4,5,6,7,8,9,0

 

6) Connect every Script filter to all the other nodes 

 

After this Units will start off the moment you type a number.

This is the same way that other workflow works.

One drawback of this that the suggestions don't work that well anymore.

so when you type 10 kil the workflow will suggest kilometers, kilos, kilogram, kilobyte etc.

but the prefix 1 will be added since that's your keyword now. so when you choose any of the suggestion

you would get something like 110 kilogram. I can fix this in the mechanism but I will try out the keywordless version for a while

to see if it will work smoothly. After that I will fix these new issues.

 

and thanks for the input!

 

 

I'm the author of the other converter and I have to say that there are a few tiny issues with the keywordless approach due to how Alfred works. The autocomplete (<tab>) is broken because it assumes that the number is the keyword.

 

@David: just added that to my converter :)

Edited by wolph

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...