From cfce08eed0dd49fbbdc87e92089601896e78bc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Sat, 7 May 2022 12:53:09 +0200 Subject: [PATCH] Handle OrgDoc's ID. --- org_rw/org_rw.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index 9416661..580f306 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -1571,6 +1571,16 @@ class OrgDoc: map(lambda hl: parse_headline(hl, self, self), headlines) ) + @property + def id(self): + """ + Created by org-roam v2. + """ + for p in self.properties: + if p.key == 'ID': + return p.value + return None + @property def path(self): return self._path