* src/GrampsDb/_GedTokens.py: fix constant table

* src/GrampsDb/_ReadGedcom.py: ALIA fix


svn: r5943
This commit is contained in:
Don Allingham 2006-02-16 15:30:59 +00:00
parent 039b7f3591
commit 807ed8f4f4
3 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2006-02-16 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GedTokens.py: fix constant table
* src/GrampsDb/_ReadGedcom.py: ALIA fix
2006-02-15 Don Allingham <don@gramps-project.org>
* src/DisplayTabs.py: Set up for EditSourceRef
* src/GrampsMime.py: handle special mime types

View File

@ -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,

View File

@ -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