Tell me how to make a simple widget to post on my website.
November 3, 2009 2:38 PM   Subscribe

Tell me how to make a simple widget to post on my website. A home cook will enter how many cups of an ingredient are called for by a recipe and she'll choose from a list the type of ingredient (e.g. bread flour or baker's sugar) and the widget will convert the volume amount to grams so she can use her food scale to weigh out the ingredient. Can you recommend a widget generator for a nonprogrammer?
posted by markcmyers to Computers & Internet (8 answers total) 1 user marked this as a favorite
 
It's not going to be that simple. The weight of a cup of flour varies drastically according to its source, its humidity, and how you measure it out.
posted by Ery at 3:24 PM on November 3, 2009


Response by poster: It's not going to be that simple. I understand. But there are standard conversion ratios. And after all, the variations you mention can all distort what a "cup" is too, but that doesn't keep cookbook authors from specifying cups, or home cooks from measuring that way. What I'm looking for is some advice about making the information in these charts interactive.
posted by markcmyers at 3:30 PM on November 3, 2009


Maybe you could use this:

unitconversion.org
posted by backwards guitar at 3:55 PM on November 3, 2009


I am not sure how well this works but it seems to do exactly what you want. Just copy/pasta the snippet into your theme file wherever you want it to go.

http://culinarty.sapiensworks.com/articles/culiverter-culinary-unit-converter-widget/
posted by shownomercy at 4:08 PM on November 3, 2009


Will any of these work?
posted by wongcorgi at 9:21 PM on November 3, 2009


So basically it's just storing a list of densities (sugar: X grams per cup, flour: Y grams per cup, super fluffy cake flour: Z grams per cup) and multiplying the volume by the selected density?
posted by hattifattener at 1:08 AM on November 4, 2009


Response by poster: So basically it's just storing a list of densities (sugar: X grams per cup, flour: Y grams per cup, super fluffy cake flour: Z grams per cup) and multiplying the volume by the selected density? Exactly.
posted by markcmyers at 3:59 AM on November 4, 2009


I put together a simple javascript+dhtml page that does that, then. Feel free to copy it to your site and edit it to suit— it just gets the densities from the "value" attributes of the popup options.

I realize that's not as straightforward as a "widget generator", but I think this is one of those problems where once you've specified the problem in enough detail for a machine to implement it for you, you've done all the work of implementing it yourself.
posted by hattifattener at 2:57 AM on November 5, 2009


« Older "F" stands for Freeway not Farm   |   Where did I read about three rules determining how... Newer »
This thread is closed to new comments.