* src/GrampsDb/_ReadGedcom.py: handle illegal fullname gedcoms produced by FTM
* src/GrampsDb/_GedTokens.py: handle illegal fullname gedcoms produced by FTM svn: r7664
This commit is contained in:
parent
231f9a1277
commit
0d1f83d32b
@ -1,4 +1,6 @@
|
||||
2006-11-21 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDb/_ReadGedcom.py: handle illegal fullname gedcoms produced by FTM
|
||||
* src/GrampsDb/_GedTokens.py: handle illegal fullname gedcoms produced by FTM
|
||||
* src/Utils.py (probably_alive): use get_primary_event_ref_list()
|
||||
* src/RelLib/_Person.py: Add get_primary_event_ref_list()
|
||||
|
||||
|
@ -134,6 +134,8 @@ TOKEN_RESN = 114
|
||||
|
||||
tokens = {
|
||||
"HEAD" : TOKEN_HEAD, "MEDI" : TOKEN_MEDI,
|
||||
"HEADER" : TOKEN_HEAD, "TRAILER" : TOKEN_TRLR,
|
||||
"CALL_NUMBER" : TOKEN_CALN, "MEDIA" : TOKEN_MEDI,
|
||||
"CALN" : TOKEN_CALN, "ABBR" : TOKEN_ABBR,
|
||||
"ABBREVIATION" : TOKEN_ABBR, "ADDR" : TOKEN_ADDR,
|
||||
"ADDRESS" : TOKEN_ADDR, "ADOP" : TOKEN_ADOP,
|
||||
@ -155,6 +157,7 @@ tokens = {
|
||||
"CHILD" : TOKEN_CHIL, "CITY" : TOKEN_CITY,
|
||||
"_COMM" : TOKEN__COMM, "CONC" : TOKEN_CONC,
|
||||
"CONCATENTATE" : TOKEN_CONC, "CONT" : TOKEN_CONT,
|
||||
"CONTINUED" : TOKEN_CONT, "CONCATENATION": TOKEN_CONC,
|
||||
"CONTINUATION" : TOKEN_CONT, "COPR" : TOKEN_COPR,
|
||||
"COPYRIGHT" : TOKEN_COPR, "CORP" : TOKEN_CORP,
|
||||
"CORPORATION" : TOKEN_CORP, "CTRY" : TOKEN_CTRY,
|
||||
|
@ -1025,27 +1025,28 @@ class GedcomParser(UpdateCallback):
|
||||
matches = self.get_next()
|
||||
key = matches[2].strip()
|
||||
if matches[0] < 0 or matches[1] == TOKEN_TRLR:
|
||||
self.backup()
|
||||
break
|
||||
if key == "FAM":
|
||||
if key in ("FAM","FAMILY"):
|
||||
self.parse_FAM(matches)
|
||||
elif key == "INDI":
|
||||
elif key in ("INDI","INDIVIDUAL"):
|
||||
self.parse_INDI(matches)
|
||||
elif key == "OBJE":
|
||||
elif key in ("OBJE","OBJECT"):
|
||||
self.parse_OBJE(matches)
|
||||
elif key == "REPO":
|
||||
elif key in ("REPO","REPOSITORY"):
|
||||
self.repo_count += 1
|
||||
self.repo = self.find_or_create_repository(matches[3][1:-1])
|
||||
self.added.add(self.repo.handle)
|
||||
self.parse_repository(self.repo)
|
||||
self.db.commit_repository(self.repo, self.trans)
|
||||
del self.repo
|
||||
elif key in ("SUBM", "SUBN"):
|
||||
elif key in ("SUBM", "SUBN", "SUBMITTER"):
|
||||
self.ignore_sub_junk(1)
|
||||
elif matches[1] in (TOKEN_SUBM, TOKEN_SUBN, TOKEN_IGNORE):
|
||||
self.ignore_sub_junk(1)
|
||||
elif key == "SOUR":
|
||||
elif key in ("SOUR","SOURCE"):
|
||||
self.parse_source(matches[3],1)
|
||||
elif matches[2].startswith("SOUR "):
|
||||
elif matches[2].startswith("SOUR ") or matches[2].startswith("SOURCE "):
|
||||
# A source formatted in a single line, for example:
|
||||
# 0 @S62@ SOUR This is the title of the source
|
||||
source = self.find_or_create_source(matches[3][1:-1])
|
||||
|
Loading…
Reference in New Issue
Block a user