X-Git-Url: https://plomlompom.com/repos/new_day?a=blobdiff_plain;ds=sidebyside;f=todo.py;h=94f3882f3c683bee5aa3b80a2922be660f70575c;hb=ecee822bebf62049803b90fc8d8a0b484915a0fc;hp=42639a11c9f28fdfbe34991af191e3bd8dc122ee;hpb=472874343c229fc77136e1cc3bae5a1d8bc543f9;p=misc diff --git a/todo.py b/todo.py index 42639a1..94f3882 100644 --- a/todo.py +++ b/todo.py @@ -1,558 +1,1151 @@ -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 -