alfred-convert icon indicating copy to clipboard operation
alfred-convert copied to clipboard

Using °C and °F

Open iandol opened this issue 3 years ago • 2 comments

Hi @deanishe, perhaps I'm doing something wrong, but looking at Pint's units I should be able to use °C and °F to reference degree_Celsius and degree_Fahrenheit:

https://github.com/hgrecco/pint/blob/master/pint/default_en.txt#L198

alfred-convert is however telling me they are unknown units? Perhaps I'm misunderstanding how the units and aliases work? An option to be able to ignore case would also be nice (degC or degc). Thanks for a great workflow!!!!!

iandol avatar Jul 20 '21 14:07 iandol

What I did is added this f = 5 / 9 * kelvin; offset: 233.15 + 200 / 9 = °F = fahrenheit = degF = degreeF c = kelvin; offset: 273.15 = °C = celsius = degC = degreeC in the unit_definitions.txt and now I can do like conv 100 f c

CaptainMalReynolds avatar Apr 02 '22 16:04 CaptainMalReynolds

What I did is added this f = 5 / 9 * kelvin; offset: 233.15 + 200 / 9 = °F = fahrenheit = degF = degreeF c = kelvin; offset: 273.15 = °C = celsius = degC = degreeC in the unit_definitions.txt and now I can do like conv 100 f c

In the case of @iandol, that'd be:

°F = 5 / 9 * kelvin; offset: 233.15 + 200 / 9 = f = fahrenheit = degF = degreeF

°C = kelvin; offset: 273.15 = c = celsius = degC = degreeC

It worked for me. I don't know why it doesn't work by default but that workaround works. Consider a PR?

alezvic avatar Jun 22 '22 20:06 alezvic