Skip to main content

A toolkit for managing and organizing the Recipyzer recipe repository.

Project description

Recipyzer

PyPI License

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.

Example Table

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recipyzer-0.1.0a1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

recipyzer-0.1.0a1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file recipyzer-0.1.0a1.tar.gz.

File metadata

  • Download URL: recipyzer-0.1.0a1.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

Hashes for recipyzer-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 b288d9c11c8b906cfbeb7554a48ddc732e3c87131bd08493a74f189c0e4ddfda
MD5 0ca3e95942ea2ca6265d66dda2e7ecd0
BLAKE2b-256 8e79a6a3cfa52dfe50ac946a4e5a183d3a0ab6ef93d1c26d64b2e81520a2becc

See more details on using hashes here.

File details

Details for the file recipyzer-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: recipyzer-0.1.0a1-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

Hashes for recipyzer-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c0a31cdf4245874d323c044a04b563e9075a3d523fa60e21958247c03b87a66
MD5 c4a5d2a294539ca17d776e2d4a873fe7
BLAKE2b-256 87aa075a8ebe1489e99616bc87b563323a415d54d528e421261ccef345f312a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page