feat: bulk update metadata from a CSV file

This commit is contained in:
Nathaniel Landau
2023-03-20 00:16:19 -04:00
parent 593dbc3b55
commit d636fb2672
14 changed files with 521 additions and 115 deletions

View File

@@ -245,6 +245,9 @@ class Frontmatter:
except Exception as e: # noqa: BLE001
raise AttributeError(e) from e
if frontmatter is None or frontmatter == [None]:
return {}
for k in frontmatter:
if frontmatter[k] is None:
frontmatter[k] = []
@@ -326,6 +329,10 @@ class Frontmatter:
return False
def delete_all(self) -> None:
"""Delete all Frontmatter from the note."""
self.dict = {}
def has_changes(self) -> bool:
"""Check if the frontmatter has changes.