feat: add FamilySearch ID to frontmatter
This commit is contained in:
5 files changed
+21
No files matched your search
@@ -56,6 +56,18 @@ class Individual:
|
||||
"""
|
||||
return self.element.get_pointer()
|
||||
|
||||
def get_fs_id(self) -> str:
|
||||
"""
|
||||
Return the FamilySearch Tree ID (`_FSFTID`) if present.
|
||||
|
||||
Returns:
|
||||
str: FamilySearch Tree ID value, or an empty string when not available.
|
||||
"""
|
||||
for child in self.element.get_child_elements():
|
||||
if child.get_tag() == "_FSFTID":
|
||||
return child.get_value() or ""
|
||||
return ""
|
||||
|
||||
def get_names(self) -> Tuple[str, str]:
|
||||
"""
|
||||
Return the individual's first and last name with surrounding whitespace removed.
|
||||
|
||||
@@ -123,8 +123,11 @@ class MarkdownGenerator:
|
||||
|
||||
birth = individual.get_birth_info()
|
||||
death = individual.get_death_info()
|
||||
fs_id = individual.get_fs_id()
|
||||
|
||||
f.write(f"ID: {individual.get_id()}\n")
|
||||
if fs_id:
|
||||
f.write(f"FamilySearch_ID: {fs_id}\n")
|
||||
f.write(f"Name: {individual.get_full_name()}\n")
|
||||
|
||||
# Lived years
|
||||
|
||||
Reference in new issue
Block a user