summaryrefslogtreecommitdiff
path: root/README
blob: 35a6b649b5beba69bfdd9a105fc230f0c081f1da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Mat is small a recipe management, food planning & lunch box inventory system.
It was written with the aim to help me, who hates cooking, to be able to eat at
regular intervals when working in an area with no decent restaurants.

If for some obscure reason, you would like to use this hackish beast, the first
thing you need to do is create a sqlite database with the following schema:

CREATE TABLE recipes (id INTEGER PRIMARY KEY AUTOINCREMENT, name, uri, servings INTEGER);
CREATE TABLE ingredients (id INTEGER PRIMARY KEY AUTOINCREMENT, name, shop_position INTEGER, primary_unit, density, piece_weight);
CREATE TABLE contents (recipe_id INTEGER, ingredient_id INTEGER, quantity FLOAT, unit);
CREATE TABLE plan (date DATETIME, mealtype, recipe_id INTEGER, state, comment_id);
CREATE TABLE comments (id INTEGER PRIMARY KEY AUTOINCREMENT, comment);
CREATE TABLE inventory (id INTEGER PRIMARY KEY AUTOINCREMENT, recipe_id INTEGER, amount INTEGER, storage, preparation_date DATETIME, energy INTEGER);
CREATE TABLE queue (id INTEGER PRIMARY KEY, recipe_id INTEGER, servings INTEGER);
CREATE TABLE mealtypes (id INTEGER PRIMARY KEY AUTOINCREMENT, mealtype);
CREATE TABLE typemap (recipe_id INTEGER, mealtype_id INTEGER);
CREATE TABLE stock (product_id TEXT, quantity FLOAT, unit TEXT, up_to_date DATETIME);
CREATE TABLE products (id TEXT PRIMARY KEY, ingredient_id INTEGER, description TEXT);
CREATE TABLE cookings (recipe_id INTEGER, date DATETIME, specific_energy INTEGER);

All basic operations are performed using the perl script mat. It is possible to
get a crude list of commands available by running: "mat help".

(Oh yeah! You might find the code quality & lack of design rubbish. That's
completely sane & so do I. I only ever code on this while also cooking. E.g.
when waiting for the stove & the oven to do its work.)