X-Git-Url: https://plomlompom.com/repos/do_day?a=blobdiff_plain;f=income_progress_bars.py;h=60f710454f5435c60ca6be4af810a19de7526cb2;hb=7c77bd5fe82ff15e0e9c6a808ff7eb5a6d859301;hp=3edb48dc75068267e00900759587d79542d59076;hpb=2c81e34cd696fd5da8b4a5d0338b2fe388fa8178;p=misc diff --git a/income_progress_bars.py b/income_progress_bars.py index 3edb48d..60f7104 100644 --- a/income_progress_bars.py +++ b/income_progress_bars.py @@ -1,13 +1,12 @@ -from http.server import BaseHTTPRequestHandler, HTTPServer import os import json import jinja2 +from plomlib import PlomDB, PlomException, run_server, PlomHandler -hostName = "localhost" -serverPort = 8081 +server_port = 8083 +db_path = '/home/plom/org/income.json' -tmpl = jinja2.Template(""" - +tmpl = """
earned | progress | surplus | |
---|---|---|---|
{{p.title}} | +|||
earned | progress | surplus | |
{{p.title}} | {{p.earned|round(2)}} | -{% if p.time_progress >= 0 %}{% endif %} | -{{p.diff_goal}} |