mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 13:22:12 +00:00
Simplify storing Tags in OrgNode object
- Use Set for Tags instead of dictionary with empty keys - No Need to store First Tag separately - Remove properties methods associated with storing first tag separately - Simplify extraction of tags string in org_to_jsonl - Split notes_string creation into multiple f-string in separate line for code readability
This commit is contained in:
@@ -60,7 +60,9 @@ def extract_entries(notesfile, verbose=0):
|
||||
if not "Body" in note or note["Body"].strip(empty_escape_sequences) == "":
|
||||
continue
|
||||
|
||||
note_string = f'{note["Title"]}\t{note["Tags"] if "Tags" in note else ""}\n{note["Body"] if "Body" in note else ""}'
|
||||
note_string = f'{note["Title"]}' \
|
||||
f'\t{note["Tags"] if "Tags" in note else ""}' \
|
||||
f'\n{note["Body"] if "Body" in note else ""}'
|
||||
entries.append([note_string, note["Raw"]])
|
||||
|
||||
# Close File
|
||||
|
||||
Reference in New Issue
Block a user