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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: recipyzer-0.1.0a4.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.0a4.tar.gz
Algorithm Hash digest
SHA256 40ebb7ca1e6d428f4a58dbb21f96750b8f3e4f5cc42e5e66b0edb597dde93de7
MD5 5ccc4e63f76f581b98edb809460b0b4a
BLAKE2b-256 f071b8dd4c9280cd79a419dc5e14d3e9035d4691a9f5bcf73575c92aaee8a980

See more details on using hashes here.

File details

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

File metadata

  • Download URL: recipyzer-0.1.0a4-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.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 9da70fffdf4be30a0448eaf9e9e6182f76f0b0a4e4835030c273d67203138d0f
MD5 f88b51484c0db8edba8d7b8bc8142e92
BLAKE2b-256 e4bfb6965472e4240237166e2fd87ce27943190db6b7f968503fcd20924bcb7c

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