]> Nutra Git (v2) - gamesguru/getmyancestors.git/commitdiff
add life sketch in notes
authorBenoît Fontaine <benoitfontaine.ba@gmail.com>
Fri, 17 Nov 2017 12:54:38 +0000 (13:54 +0100)
committerBenoît Fontaine <benoitfontaine.ba@gmail.com>
Fri, 17 Nov 2017 12:54:38 +0000 (13:54 +0100)
getmyancestors.py

index 01e29e11f8e9dc388e54a0e19c3a85d15aaf86d2..56a060d450d5c47509ece34ac8216431da3d4531 100755 (executable)
@@ -446,6 +446,8 @@ class Indi:
                         self.occupations.add(Fact(y, self.tree))
                     if y['type'] == u'http://gedcomx.org/MilitaryService':
                         self.military.add(Fact(y, self.tree))
+                    if y['type'] == u'http://familysearch.org/v1/LifeSketch':
+                        self.notes.add(Note('=== Life Sketch ===\n' + y['value'], self.tree))
                 if 'sources' in x:
                     for y in x['sources']:
                         source = self.tree.add_source(y['descriptionId'])
@@ -540,7 +542,7 @@ class Indi:
             for contributors in entries['contributors']:
                 temp.add(contributors['name'])
         if temp:
-            text = 'Contributeurs :\n' + '\n'.join(sorted(temp))
+            text = '=== Contributors ===\n' + '\n'.join(sorted(temp))
             for n in self.tree.notes:
                 if n.text == text:
                     self.notes.add(n)
@@ -683,7 +685,7 @@ class Fam:
                 for contributors in entries['contributors']:
                     temp.add(contributors['name'])
             if temp:
-                text = 'Contributeurs :\n' + '\n'.join(sorted(temp))
+                text = '=== Contributors ===\n' + '\n'.join(sorted(temp))
                 for n in self.tree.notes:
                     if n.text == text:
                         self.notes.add(n)