vscode-equality icon indicating copy to clipboard operation
vscode-equality copied to clipboard

Add conversion of cooking measurements

Open insanetesterftw opened this issue 7 years ago • 2 comments

The majority of cooking recipes on the internet, on books and magazines use inexact, non standard measurement units (cups, teaspoons, tablespoons) or outdated imperial or British units of measurement.

Converting them by hand, one by one, is cumbersome and prone to errors.

Any automatic methods of conversion that exist require specific software and are limited to do generic conversions based on the equivalence of volume to volume. None take into account the density of the ingredient.

How is this appropriate for a text editor?

A text editor is most accessible and easiest way to enter information and is freely available at no cost.

How is this appropriate for your plugin?

Your plugin seems capable of doing what I have in mind. It already does math operations.

How would it work?

The user selects text following the structure, 1 cup of flour, selects convert to grams, the plugin would then read the equivalents from a file and convert to the correct value.

1 cup of flour would be converted into 130 g of flour 3 cups of flour would be converted into 390 g of flour

The file containing the equivalents would be provided by the user and follow the scheme of one conversion per line:

1 cup of flour == 130 g

PS I don't have any background in programming and perhaps none of I have written makes sense. Please, even if this is not appropriate for this plugin, could you consider making one that does this.

Thank you.

insanetesterftw avatar Jul 26 '17 17:07 insanetesterftw

For the next version, I will look at adding the library math.js, I think it may be a good solution a unit converter. http://mathjs.org/docs/datatypes/units.html

javierartero avatar Jul 27 '17 06:07 javierartero

It would be also useful to make conversions using not well known murcian units like 'capazo', 'miaja', 'muncho', 'jartá', 'chispica' or 'punta pala'.

I don't have right here a conversion table but I'll try to figure out their direct conversion.

Thanks

fjsanpedro avatar Jul 27 '17 07:07 fjsanpedro