From 807ed8f4f41da348111fc5977871a8336b8b4bea Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 16 Feb 2006 15:30:59 +0000 Subject: [PATCH] * src/GrampsDb/_GedTokens.py: fix constant table * src/GrampsDb/_ReadGedcom.py: ALIA fix svn: r5943 --- ChangeLog | 4 ++++ src/GrampsDb/_GedTokens.py | 6 +++--- src/GrampsDb/_ReadGedcom.py | 8 ++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 890a0723f..ba1dbd49a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-02-16 Don Allingham + * src/GrampsDb/_GedTokens.py: fix constant table + * src/GrampsDb/_ReadGedcom.py: ALIA fix + 2006-02-15 Don Allingham * src/DisplayTabs.py: Set up for EditSourceRef * src/GrampsMime.py: handle special mime types diff --git a/src/GrampsDb/_GedTokens.py b/src/GrampsDb/_GedTokens.py index 2c0bc1431..3f5f807be 100644 --- a/src/GrampsDb/_GedTokens.py +++ b/src/GrampsDb/_GedTokens.py @@ -28,8 +28,8 @@ TOKEN_ADR1 = 4 TOKEN_ADR2 = 5 TOKEN_AFN = 6 TOKEN_IGNORE = 7 +TOKEN_REFN = 8 TOKEN__AKA = 9 -TOKEN__ALIA = 10 TOKEN_ALIA = 11 TOKEN_ANCI = 12 TOKEN_ASSO = 13 @@ -133,8 +133,8 @@ tokens = { "ADDRESS1" : TOKEN_ADR1, "ADR2" : TOKEN_ADR2, "ADDRESS2" : TOKEN_ADR2, "AFN" : TOKEN_AFN, "AGE" : TOKEN_IGNORE, "AGNC" : TOKEN_IGNORE, - "AGENCY" : TOKEN_AGNC, "_AKA" : TOKEN__AKA, - "_ALIA" : TOKEN__ALIA, "ALIA" : TOKEN_ALIA, + "AGENCY" : TOKEN_IGNORE, "_AKA" : TOKEN__AKA, + "_ALIA" : TOKEN_ALIA, "ALIA" : TOKEN_ALIA, "ALIAS" : TOKEN_ALIA, "ANCI" : TOKEN_ANCI, "ASSO" : TOKEN_ASSO, "ASSOCIATES" : TOKEN_ASSO, "AUTH" : TOKEN_AUTH, "AUTHOR" : TOKEN_AUTH, diff --git a/src/GrampsDb/_ReadGedcom.py b/src/GrampsDb/_ReadGedcom.py index 8d7b1a1d2..f5eaa1b23 100644 --- a/src/GrampsDb/_ReadGedcom.py +++ b/src/GrampsDb/_ReadGedcom.py @@ -473,7 +473,6 @@ class GedcomParser: } self.name_func = { - TOKEN_ALIA : self.func_name_alia, TOKEN_ALIA : self.func_name_alia, TOKEN_NPFX : self.func_name_npfx, TOKEN_GIVN : self.func_name_givn, @@ -491,7 +490,6 @@ class GedcomParser: self.person_func = { TOKEN_NAME : self.func_person_name, TOKEN_ALIA : self.func_person_alt_name, - TOKEN__ALIA : self.func_person_alt_name, TOKEN_OBJE : self.func_person_object, TOKEN_NOTE : self.func_person_note, TOKEN__COMM : self.func_person_note, @@ -624,7 +622,7 @@ class GedcomParser: if not self.groups: self.text = ""; self.backoff = False - msg = _("Premature end of file at line %d.\n") % next_line[4] + msg = _("Premature end of file at line %d.\n") % self.groups[4] self.errmsg(msg) self.error_count += 1 self.groups = (-1, TOKEN_UNKNOWN, "","") @@ -969,7 +967,7 @@ class GedcomParser: return elif matches[1] == TOKEN_CALN: repo.set_call_number(matches[2]) - self.parse_repo_caln(matches, repo. level+1) + #self.parse_repo_caln(matches, repo. level+1) elif matches[1] == TOKEN_NOTE: repo.set_note(matches[2]) else: @@ -2389,7 +2387,6 @@ def create_id(): if __name__ == "__main__": import sys import hotshot#, hotshot.stats - import const from GrampsDb import gramps_db_factory, gramps_db_reader_factory def callback(val): @@ -2416,7 +2413,6 @@ if __name__ == "__main__": ## stats.sort_stats('time','calls') ## stats.print_stats(100) else: - import time t = time.time() g.parse_gedcom_file(False) print time.time() - t