forked from kenkeiras/org-rw
Add method to get OrgDoc property.
This commit is contained in:
parent
72d5cadb96
commit
3b6358c195
@ -1292,6 +1292,13 @@ class OrgDoc:
|
||||
for content in self.contents:
|
||||
yield from get_links_from_content(content)
|
||||
|
||||
def get_property(self, name: str, default=None):
|
||||
for prop in self.keywords:
|
||||
if prop.key == name:
|
||||
return prop.value
|
||||
|
||||
return default
|
||||
|
||||
def getProperties(self):
|
||||
return self.keywords
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user