From 1673bb55587e56c3e306e4dd2390632c8f75880e Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sat, 15 Jul 2023 19:55:40 -0700 Subject: [PATCH] Add todo state to compiled form of each org-mode entry --- src/khoj/processor/org_mode/org_to_jsonl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/khoj/processor/org_mode/org_to_jsonl.py b/src/khoj/processor/org_mode/org_to_jsonl.py index 664427d9..608fdd41 100644 --- a/src/khoj/processor/org_mode/org_to_jsonl.py +++ b/src/khoj/processor/org_mode/org_to_jsonl.py @@ -125,9 +125,13 @@ class OrgToJsonl(TextToJsonl): # Ignore title notes i.e notes with just headings and empty body continue + todo_str = f"{parsed_entry.todo} " if parsed_entry.todo else "" # Prepend filename as top heading to entry filename = Path(entry_to_file_map[parsed_entry]).stem - heading = f"* {filename}\n** {parsed_entry.heading}." if parsed_entry.heading else f"* {filename}." + if parsed_entry.heading: + heading = f"* {filename}\n** {todo_str}{parsed_entry.heading}." + else: + heading = f"* {filename}." compiled = heading if state.verbose > 2: