X-Git-Url: https://plomlompom.com/repos/condition_titles?a=blobdiff_plain;ds=inline;f=calories.py;h=9951ce5c98896ef91319282143b2925b657ec280;hb=93756ded23b6f80333ef26e434f611a94bd04764;hp=5d2fc98c3aaf99ceaeae0708e6f06094370c8bc3;hpb=f659ede27c7fd6313e0bfaa8217a3359c00d5843;p=misc diff --git a/calories.py b/calories.py index 5d2fc98..9951ce5 100644 --- a/calories.py +++ b/calories.py @@ -1,43 +1,76 @@ -from http.server import BaseHTTPRequestHandler, HTTPServer import os import json import datetime +import jinja2 +from plomlib import PlomDB, PlomException, run_server, PlomHandler -hostName = "localhost" -serverPort = 8081 +db_path = '/home/plom/org/calories_db.json' -def build_page(eatable_rows, consumption_rows, eatables_selection, day_rows): - return """ - +server_port = 8081 + +tmpl = """ """ + f""" +
-