diff --git a/ImportGedcom7/import_gedcom7.py b/ImportGedcom7/import_gedcom7.py new file mode 100644 index 000000000..df4f74043 --- /dev/null +++ b/ImportGedcom7/import_gedcom7.py @@ -0,0 +1,7 @@ +from gramps_gedcom7 import import_gedcom, ImportSettings + + +def import_data(database, filename, user): + """Import a GEDCOM file into a Gramps database with user context.""" + settings = ImportSettings() + import_gedcom(input_file=filename, db=database, settings=settings) diff --git a/ImportGedcom7/importgedcom7.gpr.py b/ImportGedcom7/importgedcom7.gpr.py new file mode 100644 index 000000000..e94b5aa7d --- /dev/null +++ b/ImportGedcom7/importgedcom7.gpr.py @@ -0,0 +1,32 @@ +# Copyright (C) 2025 David Straub +# +# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +"""Import a Gedcom 7 file into Gramps.""" + +register( + IMPORT, + id="im_ged7", + name=_("GEDCOM 7"), + description=_("Import GEDCOM 7 files"), + version = "0.1.0", + gramps_target_version="6.0", + status=BETA, + fname="import_gedcom7.py", + import_function="import_data", + extension="ged7", + requires_mod=["gramps_gedcom7"], +)