wolph / alfred-converter

Alfred unit converter is a smart calculator for Alfred with support for unit conversions to make it a bit comparable to the Google Calculator and Wolfram Alpha.
93 stars 15 forks source link

inches to feet-inches? #18

Closed defenestrated closed 4 years ago

defenestrated commented 4 years ago

Hey – awesome tool, first off. Leagues faster/easier than the other converters out there.

Quick question, how hard would it be to add support in both directions for feet-inches in fractions, which is common in architecture? I'm imagining expanding on what you have for feet-inches already: 4'2" -> 50" (works) 4'2.3" -> 50.3" 4'2-1/4" -> 50.25" 50.125" -> 4'2-1/8"

wolph commented 4 years ago

I've updated the workflow to get the first 3 working already. The last one will take slightly more work but should be doable as well :)

defenestrated commented 4 years ago

daaang that was fast! so cool! the fractional part is the part that stumped me... I have dim memories of programming such a thing in a ti-83 calculator in high school -.-

wolph commented 4 years ago

I can't say it's perfect yet but I've added fractional support now

The 4'2-1/4" will result in foot 4 inch 9/4 right now. I need to think of something to reduce the fractions further.

wolph commented 4 years ago

The new version shows both proper and improper fractional results so that should be good enough :)

image

Note that the order is decided by Alfred. If you select one of the results (press enter) it will end up closer to the top the next time

defenestrated commented 4 years ago

rad! thanks so much! next time you're in san francisco, I owe you a beer =)