Jump to content

Unit converter (no longer maintained)

Recommended Posts

I just pushed an update that supports this. The code that processes the input is in convert.py. I do some very naive string pre-processing to allow unit names to contain spaces, and it was also combining the number with its units.


Cheers mate.

Link to comment
  • 4 weeks later...

Recently I upgraded to Mavericks and could not get the workflow to recognise the config file values. I had to edit 'alfred_convert.py' to actually change them.


Could you provide a bit more background? Which config file values weren't being recognized?

Link to comment
  • 1 month later...

Most of the units are currently coming from the pint library. Pint comes with an extensive set units by default, and has support for loading units from text files. The workflow actually defines a couple of custom units units in a unit_defs.txt file. You should be able to add aliases to units there, although they won't survive an upgrade (so keep a copy outside the workflow). There isn't currently a facility for custom units, although that wouldn't be too hard to add.

Link to comment
  • 2 years later...
  • 2 weeks later...
  • 2 weeks later...
1 minute ago, jason0x43 said:

I had started work on an update for this workflow, but gave it up when Apple integrated unit conversion into Spotlight, so this one is currently unmaintained.



Can you update the thread title to reflect that? I imagine that's useful for others who search and find this

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...