X-Git-Url: https://plomlompom.com/repos/do_day?a=blobdiff_plain;f=todo.py;h=11b0149028966effd5f551d1fbc0f36819838faf;hb=38b9ce0ba2b5af072554999bc5836ffe455f06db;hp=88684acff1068a989f103715ba7535a7211d30f0;hpb=5c55641640539a8a2628959d4bbbf3c0a7c8ae19;p=misc diff --git a/todo.py b/todo.py index 88684ac..11b0149 100644 --- a/todo.py +++ b/todo.py @@ -1,551 +1,987 @@ -from plomlib import PlomDB, run_server, PlomHandler, PlomException +from plomlib import PlomDB, run_server, PlomHandler, PlomException import json from uuid import uuid4 from datetime import datetime, timedelta from urllib.parse import parse_qs -from jinja2 import Template +from jinja2 import Environment as JinjaEnv, FileSystemLoader as JinjaFSLoader from urllib.parse import urlparse +from os.path import split as path_split db_path = '/home/plom/org/todo_new.json' -# db_path = '/home/plom/public_repos/misc/todo_new.json' server_port = 8082 DATE_FORMAT = '%Y-%m-%d' +j2env = JinjaEnv(loader=JinjaFSLoader('todo_templates')) -html_head = """ - -
-tasks: list add | day: -choose tasks -do tasks -| calendar -