def load(self, directory, callback=None, mode=None, force_schema_upgrade=False, force_bsddb_upgrade=False, force_bsddb_downgrade=False, force_python_upgrade=False, update=True): DbGeneric.load(self, directory, callback, mode, force_schema_upgrade, force_bsddb_upgrade, force_bsddb_downgrade, force_python_upgrade) # Dictionary-specific load: from gramps.plugins.importer.importxml import importData from gramps.cli.user import User if self._directory: backups = sorted(glob.glob(os.path.join( self._directory, "backup-*.gramps")), reverse=True) if backups: filename = backups[0] if os.path.isfile(filename): importData(self, filename, User()) self.reindex_reference_map(lambda progress: None) self.rebuild_secondary(lambda progress: None) self.has_changed = False
def load(self, directory, callback=None, mode=None, force_schema_upgrade=False, force_bsddb_upgrade=False, force_bsddb_downgrade=False, force_python_upgrade=False, update=True): DbGeneric.load(self, directory, callback, mode, force_schema_upgrade, force_bsddb_upgrade, force_bsddb_downgrade, force_python_upgrade) # Dictionary-specific load: from gramps.plugins.importer.importxml import importData from gramps.cli.user import User if self._directory: backups = sorted(glob.glob( os.path.join(self._directory, "backup-*.gramps")), reverse=True) if backups: filename = backups[0] if os.path.isfile(filename): importData(self, filename, User()) self.reindex_reference_map(lambda progress: None) self.rebuild_secondary(lambda progress: None) self.has_changed = False
def load(self, directory, callback=None, mode=None, force_schema_upgrade=False, force_bsddb_upgrade=False, force_bsddb_downgrade=False, force_python_upgrade=False): super().load(directory, callback, mode, force_schema_upgrade, force_bsddb_upgrade, force_bsddb_downgrade, force_python_upgrade) # Dictionary-specific load: from gramps.plugins.importer.importxml import importData from gramps.cli.user import User if self._directory: filename = os.path.join(self._directory, "data.gramps") if os.path.isfile(filename): importData(self, filename, User()) self.reindex_reference_map(lambda progress: None) self.rebuild_secondary(lambda progress: None)