diff --git a/scripts/generate.py b/scripts/generate.py index 3405a77..c158295 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -109,7 +109,9 @@ def load_all(top_dir_relative): path = os.path.join(root, name) try: - doc = load_org(open(path), extra_cautious=True) + doc = load_org(open(path), + environment={"org-todo-keywords": "TODO(t) NEXT(n) MEETING(m/!) Q(q) PAUSED(p!/!) EVENT(e/!) SOMETIME(s) WAITING(w@/!) TRACK(r/!) | DISCARDED(x@/!) VALIDATING(v!/!) DONE(d!/!)"}, + extra_cautious=True) docs.append(doc) except Exception as err: import traceback @@ -736,10 +738,10 @@ def render(headline, doc, graph, headlineLevel, doc_to_headline_remapping): content.append(render(child, doc, headlineLevel=headlineLevel+1, graph=graph, doc_to_headline_remapping=doc_to_headline_remapping)) - if headline.state is None: + if headline.state is None or headline.state.get('name') is None: state = "" else: - state = f'{headline.state}' + state = f'{headline.state["name"]}' if headline.is_todo: todo_state = "todo"