If there is one thing Hackaday readers have in common, they like to make things. Of course, we don’t all make the same things and that’s great. But, unsurprisingly, a lot of people who like to create things include the kitchen as their workspaces. Why not? We all have to eat and there’s something very nice about cooking a meal for your loved ones or even just yourself. Cooklang is a markdown-style language from [Brian Sunte] specifically for capturing recipes. It not only formats the recipe, but it provides an easy way for software to parse the key elements while still being human-readable. This allows you to manipulate recipes just like software, including using Git for version control, for example.
There was a time that cooking meant having big cookbooks, but now you are more likely to search the Internet. There’s only one problem. For some reason, nearly every recipe site follows the same format. Thousands of words about how much the cook’s family loves the dish, how they pick out only the most succulent tomatoes to ensure the dish will have a vibrant scarlet hue, and how much their poor granny would have loved the dish, if only she had survived the 1928 flood which is described in great detail. After 20 minutes you find out that you put the tomatoes in the blender, add a cup of water, and that’s it. Cooklang is a sort of antidote for that. You can easily write something that parses the recipe and generates, say, a shopping list or compares it to your household inventory and places an order for the remaining things from the local grocery delivery.
This made us think if we should be doing more of this. Markdown could hold directions for kits that aren’t much different from recipes. What other readable yet parsable things might be beneficial?
By the way, [Brian] eats his own dog food (that’s an idiom — we don’t think he really eats dog food) and you can find his favorite recipes online using Cooklang.
Maybe you can use this with a solar-powered tablet for your apocalypse stove. Or, perhaps you’d like a piece of toast?
Less hacker-y, but the app/extension “Copy Me That” is worth checking out for recipe aggregation. It parses the infinite word vomit out and formats recipes from any website imaginable in a standard format, at the click of a button.
Copymethat is great. I use it to export all my recipes in a .txt file, which then gets parsed and converted to markdown files, which then get rendered into my own searchable recipe website on GitHub pages. It’s all free and uses python and mdbook:
https://github.com/troyerta/recipes
You forgot to mention the adds most cooking sites seem to subject you to along with hiding various parts of the recipe
And all the photos.
I want the recipe, and any pertinent instructions.
But too many online recipes seem like they are more about something to read rather than to use. So too much preliminary, too many photos, too much clutter.
I’m more likely to go away when I see that.
Agree completely
Sadly we see commercials because that’s how people get paid. Everyone wants everything for free, so that’s the sacrifice for free bies!
I would forget about ads too. Haven’t seen any in years.
If you’re not using an ad blocker, that’s on you.
If you do use an ad blocker then you are removing the main source of income of the website which you are allowed to view for free. If everyone used an ad blocker then websites would stop existing or you’d have to pay for access. Stop being so selfish, you are already viewing their content for free and on top of that you are essentially saying F you, you’re not getting any money because of me. It’s people like you that expect everything for nothing, you still get it for free you just have to see some ads which you can choose to ignore. You are essentially like, “Well I don’t want to see any ads but I still want to view your website for free so F you, I will still view to website for free and you won’t get paid.”, Maybe think about the consequences to other people.
Yeah let me just remove ad bloxker and get 5 auto play with audio videos each website that I visit. I’m always more willing to donate to a website that I visit frequently if they don’t contain ads. And “it’s people like you”n? Wtf is that supposed to mean? People who don’t want bullshit shoved in their face just because they click a website means you get to talk shit about them? Fuck you, dude. Eat a dick and go suck off your ad sponsors.
There’s a reason every recipe blog does this. It’s for SEO. It’s not like they really want to write all that stuff, they just need the filler to get Google to list it higher to get eyeballs to their ads, sponsored content, and affiliate links so they can make a bit of money.
my recipes unusually are a list of ingredients. and the phrase, “if you don’t know what to do with this, you don’t belong in the kitchen.”
the number of recipes that go into extreme detail and has you mix things in multiple bowls only to later dump them all in a larger bowl. you can cook well without getting too technical.
yeah i’m a little more detailed than that about my steps but 90% of my recipes are either a list of ingredients followed by 3-5 sentences. a lot of recipes have lines at the bottom like “2019/05/27 used 2tsp vanilla, which was too much.”
the rest — mostly things i don’t actually make — are plain-text copy pastes from websites. the more formatting erased in that step, the better!
i don’t know what you’d need markdown for, really. the kind of hacking i do in the kitchen comes from stripping the recipe to its bare essential (i.e., dough instead of pizza, or batter instead of cake) so that embellishment feels natural/unavoidable but the key wisdom (ratio of flour milk butter eggs, whatever) is recorded.
but then, i don’t care for syntax highlighting either
“but then, i don’t care for syntax highlighting either”
Haha! Good one. I wasn’t sure it was a joke all the way up until the punchline.
I don’t think Brian wrote cooklang. In his blogpost that the article links to, he says “I was happy to discover CookLang.” The https://cooklang.org/ site links to the cooklang git repo https://github.com/cooklang, which lists a few other people as contributors.
That’s right I’m just integrating cooklang with my existing site and collecting recipes. Though I have a couple ideas I’d like to contribute
Recipe blogs (& books) include that big chunk of text at the start due to the way copyright works. Cooking recipes are considered just instructions, and thus not covered by copyright. The big chunk of text however IS copyrightable, and by publishing them together the instructions become part of that copyrighted work.
The layout is also copyrightable. That’s why some bible versions carry a copyright even though the Bible itself is not.
Hey! I really appreciate the shout out! I’m a long time reader of hackaday and reshared it here
https://www.linkedin.com/posts/briansunter_hack-your-recipes-activity-6906812976536666112-lEOC
Hoping for an end to cup measures. Grams and millilitres!!!
Never mind the milliliters. I want _everything_ in grams.
100 ml of olive oil? Yuck. Give it to me in grams so I can just pour it into the mixing bowl that is sitting on a scale.
just multiply its density. about 0.9 g/ml
So.. as an avid homebrewer(of what one could call beer).. I’m excited to see how this might be adapted..
17lbs Maris Otter mashed @148F
1lb flaked oats mashed @148F
.5oz challenger hops @60 mins
1oz challenger hops @7 days
2.5oz challenger hops @4 days
11g wyeast london ESB @pitching temp
ferment @63-65F until terminal gravity(usually 7-14 days)
yields ~10G of a decent bitter ~4.2%..
// still old school c/c++ dev.. out of practice ~20 years earth time, maybe this works? /* above is an award winning ESB/EB recipe.. Shhhh.. don’t tell anyone */
OK, so I have to change things to fit.. I suppose it starts with..
Actually, no friggin clue, start me with a class that is
brew…
and let me inherit from there…
You lost me at “yields ~10G of a decent bitter.”
Didn’t know there was such a thing… ;)
This is on my big list of things-I-need-to-write-If-nonexistant:
My recipes are typically flow charts, with (left side of the page) a list of ingredients, which then get combined using nodes describing the operation (“blend”, “whisk”) or simply permuted (“melt in water bath”); most of these operations don’t use full words but a hand-drawn pictogram.
In the end, the whole page contains a graph: a tree with its root, the final product, on the right end, and leaves, the ingredients, on the left side.
Obvious advantages are:
* shopping list on left
* No reading text while your oven is exploding, much easier overview
* Clearly visible what the critical path is, so, what needs to be done *now* (good for doing things under high time pressure – I used to volunteer as the chef of a catastrophe service, where exercises routinely were ~ 40 people, and I was alone in the kitchen)
Is there tooling, a language other than just using e.g. `dot`, `tikz` or similar to note down the raw graph, for that?
Something like this?
http://www.cookingforengineers.com/recipe/122/Beef-Stroganoff/trn
This is more or less how I want it.
Preferable with lanes of stuff that can be done simultaneous.
Mindmaps come to mind (pun unintentional).. https://miro.com/mind-map/
Yes! I’ve started documenting my recipes this way, and would love to see more tools for this. There’s a good discussion here: https://twitter.com/hydrosquall/status/1486157532968148996
I love the rich recipe online sites. I’m a Pedant so more detail is never enough. Plus gorgeous food pics and delicious writing get me in the mood for the fruits of my labor in the kitchen.
If only the Honeywell Kitchen Computer was powerful enough to run CookLang, it would have been a perfect match.
“For some reason, nearly every recipe site follows the same format. Thousands of words about how much the cook’s family loves the dish, … After 20 minutes you find out that you put the tomatoes in the blender, add a cup of water, and that’s it.”
This sounds like the recipe for the typical Hackaday article.
:)
Now we just need an AI tool to parse Cooklang and add in a bunch of unnecessary prose about the author’s childhood pet hampster and the Finnish economy and we can automate away the job of online recipe writer!
git clone Beef_Wellington
make
eat
make clean
+500 Quatloo…
If you prefer JSON, there’s a JSON Schema for recipes too: https://schema.org/Recipe
Which includes support for dietary restrictions (something CookLang seems to currently lack).
There’s also the web-native hRecipe microformat, which is used by some major recipe sites: https://microformats.org/wiki/hrecipe
But the tooling for CookLang definitely looks good/better (or, at the very least, easier to find).
If you prefer JSON, there’s a JSON Schema for recipes: https://schema.org/Recipe
Which includes support for dietary restrictions (something CookLang seems to currently lack).
There’s also the web-native microformat hRecipie: https://microformats.org/wiki/hrecipe
But the tooling for CookLang definitely looks good/better (or, at the very least, easier to find).
My roommate and I developed a similar solution but with more focus on human-readability: https://recipemd.org/
We also have the recipemd-extract that converts recipes from various websites to recipemd: https://github.com/AberDerBart/recipemd-extract
Only drog dealers use grams.
Time will come to protect amount of eggs with captcha
This site addresses the complaint of too much story in your recipes.
Blame SEO for the word salad. Measuring for “depth” of scrolling, amount of time spent on the page, “valuable” phrases, etc… led to “as a young boy in Romania, before founding a company which disabled the buy button, I loved to eat my grandmother’s potatoes”
Most sites have a “jump to reicpe” button, and from there, a “print” button. Print the recipe as a PDF, and you’re good to go.
Yeah, you know why those recipe sites do that? To force you to scroll and load more ad revenue. Sooooo ungodly annoying. The observation is right on. Cool idea.
Only took us 40 years or so to get round to it… one of the classic “but what would I do with a computer once I’ve built one” things through the late 70s early 80s, was the theoretical promise of “organizing your recipes” and “menu planning” .. sure I guess a few ppl hammered them into simple database type structures, but we never really leveraged the computing rather than the same kind of storage framework that you could have implemented mechanically Hollerith style in the 1920s.
I kind of thought those articles were fiction. I remember them, but they seemed to be about legitimizing a computer, rather than practical use. They came early, when most people interested in computers merely wanted one. Usiing them was in the future.
But such articles might be useful to prove a value to spouses. “Of course it’s useful, you can keep your recipes”. All you needed was to get the computer home.