Remove GRDB export code. GRDB export is not supported.
svn: r11144
This commit is contained in:
parent
8e8f37d5d3
commit
e9c1b1de89
@ -211,7 +211,6 @@ src/GrampsDbUtils/importdbdir.py
|
||||
src/GrampsDbUtils/_ReadGedcom.py
|
||||
src/GrampsDbUtils/_ReadXML.py
|
||||
src/GrampsDbUtils/_WriteGedcom.py
|
||||
src/GrampsDbUtils/_WriteGrdb.py
|
||||
src/GrampsDbUtils/_WriteXML.py
|
||||
src/GrampsDbUtils/__init__.py
|
||||
|
||||
|
@ -22,7 +22,6 @@ pkgdata_PYTHON = \
|
||||
_ReadGedcom.py\
|
||||
_ReadXML.py\
|
||||
_WriteGedcom.py\
|
||||
_WriteGrdb.py\
|
||||
_WriteXML.py
|
||||
|
||||
pkgpyexecdir = @pkgpyexecdir@/GrampsDbUtils
|
||||
|
@ -29,14 +29,10 @@ for a database backend.
|
||||
The app_* constants in const.py can be used to indicate which backend is
|
||||
required e.g.:
|
||||
|
||||
> # To get a XML writer
|
||||
> GrampsDb.gramps_db_writer_factory(db_type = const.APP_GRAMPS_XML)
|
||||
>
|
||||
> # To get a Gedcom reader
|
||||
> GrampsDb.gramps_db_reader_factory(db_type = const.APP_GEDCOM)
|
||||
|
||||
As of 3.0 the writer_factory is deprecated. Exporter uses directly the plugin
|
||||
system for export, no factory needed.
|
||||
"""
|
||||
import const
|
||||
|
||||
|
@ -1,69 +0,0 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2005-2006 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id:_WriteGrdb.py 9912 2008-01-22 09:17:46Z acraphae $
|
||||
|
||||
# Written by Alex Roitman
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Standard Python Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
from gettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Gramps Modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from GrampsDbUtils._GrampsBSDDB import GrampsBSDDB
|
||||
from QuestionDialog import ErrorDialog
|
||||
from gen.utils import db_copy
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Importing data into the currently open database.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def cli_callback(val):
|
||||
pass
|
||||
|
||||
def exportData(database, filename, person=None, callback=None, cl=False):
|
||||
|
||||
if callback is None:
|
||||
callback = cli_callback
|
||||
|
||||
filename = os.path.normpath(filename)
|
||||
new_database = GrampsBSDDB()
|
||||
try:
|
||||
new_database.load(filename,callback)
|
||||
except:
|
||||
if cl:
|
||||
print "Error: %s could not be opened. Exiting." % filename
|
||||
else:
|
||||
ErrorDialog(_("%s could not be opened") % filename)
|
||||
return
|
||||
|
||||
# copy all data from new_database to database
|
||||
db_copy(database, new_database,callback)
|
||||
|
||||
new_database.close()
|
@ -29,9 +29,9 @@ depends on Gtk.
|
||||
A number of importers and exporters are provided to convert between
|
||||
the different backend formats.
|
||||
|
||||
To obtain a class that implements writers use the gramps_db_writer_factory
|
||||
method and for readers use the gramps_db_reader_factory method. For information
|
||||
on using these factories see the _GrampsDbUtilsFactories.py file comments.
|
||||
To obtain a class that implements readers use the gramps_db_reader_factory
|
||||
method. For information on using this factory see the
|
||||
_GrampsDbUtilsFactories.py file comments.
|
||||
|
||||
"""
|
||||
|
||||
|
@ -17,7 +17,6 @@ class Test1(unittest.TestCase):
|
||||
self.assertTrue(par in sys.path,
|
||||
"par %r has to be in path!" % par)
|
||||
ilist = (
|
||||
"_WriteGrdb",
|
||||
"_WriteXML",
|
||||
"_WriteGedcom",
|
||||
"_ReadXML",
|
||||
|
@ -42,20 +42,6 @@ class FactoryTest(unittest.TestCase):
|
||||
|
||||
self.assertRaises(GrampsDb.GrampsDbException, GrampsDb.gramps_db_factory, "gibberish")
|
||||
|
||||
def test_gramps_db_writer_factory(self):
|
||||
"""Test that gramps_db_writer_factory returns the correct method."""
|
||||
|
||||
md = GrampsDb.gramps_db_writer_factory(db_type = const.app_gramps)
|
||||
assert callable(md), "Returned method is %s " % str(md)
|
||||
|
||||
md = GrampsDb.gramps_db_writer_factory(db_type = const.app_gramps_xml)
|
||||
assert callable(md), "Returned method is %s " % str(md)
|
||||
|
||||
md = GrampsDb.gramps_db_writer_factory(db_type = const.app_gedcom)
|
||||
assert callable(md), "Returned method is %s " % str(md)
|
||||
|
||||
self.assertRaises(GrampsDb.GrampsDbException, GrampsDb.gramps_db_writer_factory, "gibberish")
|
||||
|
||||
def test_gramps_db_reader_factory(self):
|
||||
"""Test that gramps_db_reader_factory returns the correct method."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user