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.0a3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

recipyzer-0.1.0a3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: recipyzer-0.1.0a3.tar.gz
  • Upload date:
  • Size: 6.8 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.0a3.tar.gz
Algorithm Hash digest
SHA256 21ed9e4e5cb93dfe1829138cd1bfd67b977b5e5fc1ed3c590d1b173c9a490e10
MD5 ab078efc2cc084ae735394828fc4c781
BLAKE2b-256 b676dd402c162d7315c43ceb6f6d303e7a34953fb7722da4463c3974e5251fc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: recipyzer-0.1.0a3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 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.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 a23882790e36c903907480fb48ff079310089bea1fa16d738d77d018835c919d
MD5 b6e98a106278c8af7c851d2a2bf76e8f
BLAKE2b-256 c2909bacaaa3df36e99cddd784ac5742813e81e606049f72f8e11f0a38c1794b

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