https://github.com/reciperium/recipe-lang
Write recipes understood by humans and machines
https://github.com/reciperium/recipe-lang
cooking cooking-recipes language markup-language winnow
Last synced: 7 months ago
JSON representation
Write recipes understood by humans and machines
- Host: GitHub
- URL: https://github.com/reciperium/recipe-lang
- Owner: reciperium
- License: mit
- Created: 2023-05-24T11:03:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-27T11:15:21.000Z (about 1 year ago)
- Last Synced: 2024-05-30T16:00:11.985Z (about 1 year ago)
- Topics: cooking, cooking-recipes, language, markup-language, winnow
- Language: Rust
- Homepage: https://crates.io/crates/recipe-parser
- Size: 124 KB
- Stars: 16
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Recipe Lang (recp)
[LOGO HERE](https://github.com/reciperium/recipe-lang/issues/1)
> Write recipes understood by humans and machines, powering [reciperium.com](https://www.reciperium.com)
> [!WARNING]
>
> Recipe lang is in its infancy, things may change unexpectedly## About
Recipe Lang aims to be a general language to describe recipes of any kind (food, art, construction, etc.).
For example:
- how to prepare a soup
- how to make a burrito
- how to make your own deodorant
- how to make your tooth paste
- how to build a wooden chairTo learn more read the [specification](./spec.md)
File extension: `.recp` (/re c p/) reads like recipe.
```recp
Take {potatoes}(3) and wrap them in &{aluminium foil}.
Throw them in the fire of the grill
Wait for t{1 hour}
```## Installation
### Nix
On Mac or Linux you can run:
```sh
nix profile install 'github:reciperium/recipe-lang#recp'
```### Cargo
```sh
cargo install recp
```## Features
Recipe lang supports:
- Ingredients with the tag `{ingredient_name}` or with amount: `{ingredient_name}(200gr)`
- Materials: `&{pot}`
- Timers: `t{15 minutes}`
- Recipe links: `@{woile/tomato-sauce}`
- Metadata: with `>> tags: abc, easy, high-fiber`
- Backstory: Separated by `---`, where you can add the history, see [examples/buddha-bowl.recp](examples/buddha-bowl.recp)
- Comments: with `/* my comment */`Check more examples in the [examples folder](./examples/).
[Vs Code Extension](https://marketplace.visualstudio.com/items?itemName=woile.recipe-lang)
## Sample
```recp
>> name: Potatoes a la Jean-Claude
>> tags: vegan
>> servings: 2Preheat the oven to 180 C.
Cut the {red potatoes}(500gr) into fourths.
Put them in a &{bowl}, then add the {garlic}(8), add {oil},
{salt}, {pepper} and {rosemary} to your liking.
Mix everything and place them on an oven plate.
Roast for t{20 minutes}, then mix it and roast for another t{20 minutes}.
Enjoy!
```In a file called: `potatoes-ala-jean-claude.recp`
We can the read this recipe with the `recp` cli:
```sh
recp show potatoes-ala-jean-claude.recp
```It will show
```
Potatoes A La Jean ClaudeIngredients
red potatoes 500 gr
garlic 8
oil
salt
pepper
rosemaryInstructions
Preheat the oven to 180 C.
Cut the red potatoes into fourths.
Put them in a bowl, then add the garlic, add oil,
salt, pepper and rosemary to your liking.
Mix everything and place them on an oven plate.
Roast for 20 minutes, then mix it and roast for another 20 minutes.
Enjoy!
```