A toolkit for managing and organizing the Recipyzer recipe repository.
Project description
Recipyzer
Recipyzer is a Python package designed to read recipe markdown files and create index files for easy recipe organization and retrieval.
Features
- Organize recipes into category folders within the
recipes
directory. You can create subfolders for different types of recipes (e.g., Appetizers, Main Courses, Desserts) or any other categorization you prefer. There is no limit to the number of levels of subfolders. - Add metadata to recipes including tags, cuisine, ingredients, seasons, holidays, and more.
- Recipyzer creates an organized structure of index files in markdown format that can be used to browse and search recipes easily.
ℹ️ You can see Recipyzer in use in the Recipyzer Repository.
Installation
You can install Recipyzer from PyPI:
pip install recipyzer
Front Matter Structure
Each recipe markdown file should include front matter with metadata. The metadata structure is as follows:
---
title: "Recipe Title"
description: "A brief description of the recipe."
category: "Category/Subcategory" # e.g., Appetizers/Cold, Main Courses/Meat (should match the directory path under the `recipes` directory)
cuisine: "Cuisine Type" # e.g., Italian, Mexican
tags: ["tag1", "tag2", "tag3"] # e.g., [vegan, quick, summer]
allergens: ["allergen1", "allergen2"] # e.g., [gluten, dairy]
prep_time: "Preparation Time" # e.g., 15 minutes
cook_time: "Cooking Time" # e.g., 30 minutes
total_time: "Total Time" # e.g., 45 minutes
servings: "Number of Servings" # e.g., 4
calories: "Calories per Serving" # e.g., 250
author: "Author's Name"
date: "Date" # e.g., 2024-09-13
ingredients:
- "Ingredient 1"
- "Ingredient 2"
- "Ingredient 3"
image_url: "URL to an image of the dish"
difficulty: "Difficulty level" # e.g., Easy, Medium, Hard
nutrition:
carbs: "Carbohydrates per serving" # e.g., 30g
protein: "Protein per serving" # e.g., 10g
fat: "Fat per serving" # e.g., 15g
season: "Season" # e.g., Summer, Winter
holidays: ["Holiday1", "Holiday2"] # e.g., [Christmas, Thanksgiving]
---
Not all fields are required, but the more information you provide, the better your recipes can be indexed.
The following fields are used by Recipyzer to index recipes:
title
: The title of the recipe.category
: The category and subcategory of the recipe.cuisine
: The type of cuisine the recipe belongs to.tags
: A list of tags for the recipe (e.g., vegan, quick, summer).ingredients
: A list of ingredients required for the recipe.season
: The season the recipe is best suited for.holidays
: A list of holidays the recipe is associated with.
Usage
To use Recipyzer, you need to create a directory structure for your recipes and add recipe markdown files with the appropriate front matter. Then, you can run Recipyzer to generate index files for your recipes.
Here's an example directory structure:
index/
recipes/
├── Appetizers/
│ ├── cold_appetizer1.md
│ └── hot_appetizer1.md
├── Main Courses/
│ ├── meat_course1.md
│ └── vegetarian_course1.md
└── Desserts/
├── cake1.md
└── cookies1.md
To generate index files for your recipes, run the following command:
recipyzer
This command will create index files in the index
directory that you can use to browse and search your recipes.
The resulting directory structure will look like this:
index/
├── Tags/
│ ├── tag1.md
│ ├── tag2.md
│ └── tag3.md
├── Cuisine/
│ ├── cuisine1.md
│ └── cuisine2.md
├── Ingredients/
│ ├── ingredient1.md
│ ├── ingredient2.md
│ └── ingredient3.md
├── Seasons/
│ ├── season1.md
│ └── season2.md
└── Holidays/
├── holiday1.md
└── holiday2.md
recipes/
├── Appetizers/
│ ├── cold_appetizer1.md
│ └── hot_appetizer1.md
├── Main Courses/
│ ├── meat_course1.md
│ └── vegetarian_course1.md
└── Desserts/
├── cake1.md
└── cookies1.md
Example Index Files
Here's an example of an index file generated by Recipyzer for all recipes tagged as "easy". The index file is in markdown format and can be used to browse recipes easily.
Markdown Format
# Easy Recipes
| Recipe | Category | Cuisine | Tags |
|--------|----------|---------|------|
| [Caesar Salad](../../recipes/Salads/Tossed/Caesar%20Salad.md) | [Salads/Tossed](../../Salads/Tossed/) | [American](../Cuisine/american.md) | [healthy](../Tags/healthy.md), [quick](../Tags/quick.md), [easy](../Tags/easy.md) |
| [Spaghetti Carbonara](../../recipes/Cereals/Spaghetti/Spaghetti%20Carbonara.md) | [Cereals/Spaghetti](../../Cereals/Spaghetti/) | [Italian](../Cuisine/italian.md) | [pasta](../Tags/pasta.md), [quick](../Tags/quick.md), [easy](../Tags/easy.md) |
Preview
When previewed in a markdown viewer, the index file will display as a table with clickable links to the recipe files.
Contributing
We welcome contributions for the improvement of Recipyzer. If you have any suggestions or improvements, feel free to submit a pull request.
For detailed contribution guidelines, please read the CONTRIBUTING.md file.
License
The Recipyzer python package is licensed under the MIT License for the repository structure and code. See the LICENSE.md file for details.
Copyright
All recipes in the Recipyzer repository are copyrighted by their respective authors. Unauthorized use and/or duplication of this material without express and written permission from the author is strictly prohibited. Please see the COPYRIGHT.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file recipyzer-0.1.0a2.tar.gz
.
File metadata
- Download URL: recipyzer-0.1.0a2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ea7ff9fbb81173f2820f0e7e6525816f03df01975ee100f8207146384faa7c0 |
|
MD5 | 716aaffdc73c06caf024d577f52f9e0d |
|
BLAKE2b-256 | 6f91f3dc20d889baa2782d5ab737100d9d18c69cb61b8b5393ca1543332e3e2f |
File details
Details for the file recipyzer-0.1.0a2-py3-none-any.whl
.
File metadata
- Download URL: recipyzer-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d8621c9deccaf2ecb2347263750d468334343fe6d6dc690c7d89791d041a29 |
|
MD5 | e35004d53b416ad48e2b101706d91abb |
|
BLAKE2b-256 | a2685d089d775eddd24e376d6f5a6bd3548e5b1b6cef8d55c1ae836361e463ac |