X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_structured?a=blobdiff_plain;f=calories.py;h=28b1a16e0e99dfea186d6ff91f7dd8c006d1dad0;hb=5a6e56223e59fb628f88070957b39a42d3b7c945;hp=5d2fc98c3aaf99ceaeae0708e6f06094370c8bc3;hpb=f659ede27c7fd6313e0bfaa8217a3359c00d5843;p=misc diff --git a/calories.py b/calories.py index 5d2fc98..28b1a16 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""" +
-