You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that something like: self.title = tree.xpath('//title/text()')
could also provide a basic content (sourcing with references),
and could be useful for records management (update, delete, etc.),
like current description on events and internet item.
"Imported from Geneanet" string is not translated yet, but could be
more dynamic by looking at title page? Something like:
@@ -544,7 +544,10 @@ def get_or_create_event(self,gobj,attr,tran):
event = Event()
uptype = getattr(EventType,attr.upper())
event.set_type(EventType(uptype))
- event.set_description('Imported from Geaneanet')+ if self.title == "": #TODO family event+ event.set_description('Geneanet')+ else:+ event.set_description(str(self.title[0]))
db.add_event(event,tran)
eventref = EventRef()
@@ -716,6 +719,7 @@ def __init__(self,father,mother):
# Pointer to the Gramps Family instance
self.family = None
# Geneanet properties
+ self.title = ""
self.g_marriagedate = None
self.g_marriageplace = None
self.g_marriageplacecode = None
@@ -1116,6 +1118,7 @@ def from_geneanet(self,purl):
print(_("Unable to perform HTML analysis"))
self.url = purl
+ self.title = tree.xpath('//title/text()')@@ -1447,7 +1452,7 @@ def to_gramps(self):
found = True
if not found:
url = Url()
- url.set_description("Imported from Geneanet")+ url.set_description(str(self.title[0]))
url.set_type(UrlType.WEB_HOME)
url.set_path(self.url)
grampsp.add_url(url)
need to polish and refactor a little bit, but this should be more accurate than the generic hard coded string.
'Not related ' tool, under utility item on menu, provides a sample for tag
set on individuals. Time could be one common marker for the import process.
As suggested at gramps-project/addons-source#473 (comment)
The text was updated successfully, but these errors were encountered: