Skip to content

Commit

Permalink
basic support for gramps config key
Browse files Browse the repository at this point in the history
Add timestamp as tag on imported objects
it can generate a large number of tag entries...
  • Loading branch information
romjerome authored Jun 8, 2021
1 parent fee8ed8 commit afee7b0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions GeneanetForGramps.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ def get_or_create_event(self, gobj, attr, tran, timelog):
gobj is a gramps object Person or Family
'''

default_tag = timelog
if config.get('preferences.tag-on-import'):
pref = config.get('preferences.tag-on-import-format')
default_tag = time.strftime(pref)
else:
default_tag= timelog
event = None
# Manages name indirection for person
if gobj.__class__.__name__ == 'Person':
Expand Down Expand Up @@ -1842,11 +1846,11 @@ def geneanet_to_gramps(p, level, gid, url):
progress.step()
return(p)

def g2gaction(gid,purl):
def g2gaction(gid, purl):
global progress

# Create the first Person
gp = geneanet_to_gramps(None,0,gid,purl)
gp = geneanet_to_gramps(None,0, gid, purl)

if gp != None:
if ascendants:
Expand Down Expand Up @@ -1938,7 +1942,7 @@ def main():
print(_("WARNING: Force mode activated"))
time.sleep(TIMEOUT)

g2gaction(gid,purl)
g2gaction(gid, purl)

db.close()
sys.exit(0)
Expand Down

0 comments on commit afee7b0

Please sign in to comment.