Skip to main content

Reference implementation for `BiteMark` - a markup language for recipes based on Markdown.

Project description

BiteMark

PyPI - Version PyPI - Python Version codecov

Reference implementation for BiteMark - a markup language for recipes based on Markdown.

Why

I was looking for a uniform way to store my collected recipes in digital form. Since I've already stored my notes in Markdown format for many years, it seemed like a reasonable choice for recipes too:

  1. It's human readable - so are recipes!
  2. It's structured - so are recipes!
  3. It's easily extensible
  4. It's straighforward to format text and lists

Why not JSON-LD?

Many websites expose recipe metadata in JSON-LD format which is great for extracting the data, but while this if technically human-readable, it's not a great experience.

Specification

Recipe Structure

# <Recipe title>

## Ingredients

- <quantity> <unit> <ingredient>
- <quantity> <unit> <ingredient>

## Instructions

1. Step 1
2. Step 2

E.g. a very simple recipe could look like this:

# Spaghetti Carbonara

## Ingredients

- 200 g spaghetti
- 100 g pancetta

## Instructions

1. Boil pasta.
2. Fry pancetta.

Units

In order to facilitate unit conversion, units are sorted into two categories:

  1. Volume
  2. Mass
  • Volume:
    • ml
    • liter / l
    • cup_us - American cup
    • cup_uk - British cup
    • cup - Defaults to American cup
    • tablespoon / tbsp
    • teaspoon / tsp
    • pint
  • Mass:
    • g / gram
    • kg / kilogram
    • oz / ounce
    • lb / pound

Multiple Recipes

  • A Markdown file may contain multiple recipes, each beginning with a Markdown header (# or ##).

Metadata (Optional)

Metadata can be placed at the top of the recipe inside an HTML comment block. This is so the metadata won't be rendered. This little syntactic trick is necessary because, sadly, Markdown does not support comments directly.

Here is an example for common metadata:

<!--
servings: 4
cuisine: Italian
units: metric
-->

There are no formal restrictions on which keys can be used in metadata.

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

bitemark-0.1.0.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitemark-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file bitemark-0.1.0.tar.gz.

File metadata

  • Download URL: bitemark-0.1.0.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bitemark-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46b5f6347eb77eaaaa0421581673a61e92ca6fcd188bd1a79fff1844d3c79308
MD5 6d388729b9fee6a65272dca78ce1a483
BLAKE2b-256 65831d19ce90fc567085fa70fbec9983769d90a990ef321f67f27183ee697504

See more details on using hashes here.

File details

Details for the file bitemark-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bitemark-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bitemark-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84f14c97769187c40ef9e1be788248af0f41e3473901b794a08206b78ebfa741
MD5 c9aab1759058ea7bc443b5f2c317529d
BLAKE2b-256 caeca437134245a8d0f273d97fa09150ef615cd716e887d43e765a2522a3f86d

See more details on using hashes here.

Supported by

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