3 ms·
Is there a drop-in open source library that basically does Google-like calculations, including conversions? It's one of those things that Google does so well I
by DrSprout 16y ago
Is there a drop-in open source library that basically does Google-like calculations, including conversions? It's one of those things that Google does so well I don't really feel compelled to do myself, but really feel like I should have a tool for because it's not something you need a massive server farm for.
- roryokane 16y agoI'm not sure if it's open source, but there's a command-line tool that came with my Mac that may also be on your machine to do unit conversions. It's called "units". Even if you don't want to call it directly, you may be able to use the conversion table files that are stored somewhere for it to use. As for calculations, if they are basic, interpreting the calculation as Ruby or Python code might work, though it risks the user entering something more dangerous that might need to be checked for.
- wazoox 16y agoI think qalculate lib does just that, and even better than google (understand abbreviations, and convert even unseen units like miles per minute or whatever).