Move _GedcomParse.py to src/plugins/lib/libgedcom.py. Remove GrampsDbUtils.
svn: r13940
This commit is contained in:
@@ -41,7 +41,7 @@ import time
|
||||
import gen.lib
|
||||
from gen.lib.date import make_gedcom_date, MONTH
|
||||
import const
|
||||
import GrampsDbUtils._GedcomParse as libgedcom
|
||||
import libgedcom
|
||||
import Errors
|
||||
from ExportOptions import WriterOptionBox
|
||||
import BasicUtils
|
||||
|
||||
@@ -43,10 +43,10 @@ LOG = logging.getLogger(".GedcomImport")
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import Errors
|
||||
from GrampsDbUtils._GedcomParse import GedcomParser, GedcomStageOne
|
||||
from QuestionDialog import ErrorDialog, DBErrorDialog
|
||||
from glade import Glade
|
||||
from libmixin import DbMixin
|
||||
import libgedcom
|
||||
|
||||
try:
|
||||
import config
|
||||
@@ -102,14 +102,14 @@ def importData(database, filename, callback=None):
|
||||
|
||||
try:
|
||||
ifile = open(filename, "rU")
|
||||
stage_one = GedcomStageOne(ifile)
|
||||
stage_one = libgedcom.GedcomStageOne(ifile)
|
||||
stage_one.parse()
|
||||
|
||||
if code_set:
|
||||
stage_one.set_encoding(code_set)
|
||||
ifile.seek(0)
|
||||
gedparse = GedcomParser(database, ifile, filename, callback,
|
||||
stage_one, DEFAULT_SOURCE)
|
||||
gedparse = libgedcom.GedcomParser(database, ifile, filename, callback,
|
||||
stage_one, DEFAULT_SOURCE)
|
||||
except IOError, msg:
|
||||
ErrorDialog(_("%s could not be opened\n") % filename, str(msg))
|
||||
return
|
||||
|
||||
@@ -7,7 +7,8 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/lib
|
||||
|
||||
pkgdata_PYTHON = \
|
||||
libcairodoc.py\
|
||||
libformatting.py \
|
||||
libformatting.py\
|
||||
libgedcom.py\
|
||||
libgrampsxml.py\
|
||||
libgrdb.py\
|
||||
libhtml.py\
|
||||
|
||||
5596
src/plugins/lib/libgedcom.py
Normal file
5596
src/plugins/lib/libgedcom.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -56,6 +56,22 @@ authors_email = ["http://gramps-project.org"],
|
||||
#load_on_reg = True
|
||||
)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# libgedcom
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
register(GENERAL,
|
||||
id = 'libgedcom',
|
||||
name = "GEDCOM library",
|
||||
description = _("Provides GEDCOM processing functionality"),
|
||||
version = '1.0',
|
||||
status = STABLE,
|
||||
fname = 'libgedcom.py',
|
||||
authors = ["The Gramps project"],
|
||||
authors_email = ["http://gramps-project.org"],
|
||||
)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# libgrampsxml
|
||||
|
||||
@@ -30,6 +30,8 @@ import os
|
||||
from tempfile import mkstemp
|
||||
from gettext import gettext as _
|
||||
from glade import Glade
|
||||
import libgedcom
|
||||
|
||||
#
|
||||
# Interface to phpGedView
|
||||
#
|
||||
@@ -315,7 +317,6 @@ class phpGedViewImporter(object):
|
||||
gtk.main_iteration()
|
||||
|
||||
def on_next_pressed_cb(self, widget, event=None, data=None):
|
||||
from GrampsDbUtils import GedcomParser
|
||||
if event:
|
||||
print event.type
|
||||
|
||||
@@ -334,7 +335,7 @@ class phpGedViewImporter(object):
|
||||
|
||||
self.update_progressbar( _("Importing GEDCOM..."))
|
||||
|
||||
GedcomParser.importData(self.db, fn)
|
||||
libgedcom.GedcomParser.importData(self.db, fn)
|
||||
# done. bye.
|
||||
self.dialog.destroy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user