Changes

Jump to: navigation, search

GEPS 009: Import Export Merge

1,695 bytes added, 21:22, 7 February 2016
UID, GUID and _UID, what is needed in GRAMPS?
This page is for the discussion of a proposed implementation of the merging old and new data both whilst importing, and as a independent merge process, in GRAMPSGramps. As this action is closely related to import and export, this section has been named "Import Export Merge"
== Import Export Merge ==
=== Current State ===
Officially, GRAMPS Gramps import does not merge existing data with new data being imported. (The Spreadsheet/CSV does do a type of merge, but let's leave that aside for the moment. It is discussed in a section of [[Gramps_3Gramps_4.3_Wiki_Manual_2_Wiki_Manual_-_Manage_Family_Trees:_CSV_Import_and_Export | Gramps Manual]]). However, the standard GRAMPS Gramps import will duplicate some data (such as events, but not people) if you import a GEDCOM file twice. This proposal will fix this bug by allowing a user to intelligently, interactively, or automatically do a better job than the current version.
This same process can be used to interactively merge two objects in GRAMPS Gramps by the user. For example, a user may realize that two person entries are really the same person, and so should be combined.
==== Current Related Files ====
# Lib
## [http:{{Code Browser}}ci/master/gramps.svn.sourceforge.net/viewvctree/gramps/trunk/src/plugins/lib/libgrdblibmixin.py?view=markup src/plugins/lib/libgrd.py]## [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/plugins/lib/libmixin.py?view=markup src/plugins/lib/libmixin.py]
# Import
## [http:{{Code Browser}}ci/master/gramps.svn.sourceforge.net/viewvctree/gramps/trunk/src/plugins/importimporter/ srcgramps/plugins/importer/import/Import*.py]## [http:/{{Code Browser}}ci/gramps.svn.sourceforge.netmaster/viewvctree/gramps/trunk/src/plugins/importimporter/importgedcom.glade srcgramps/plugins/importimporter/gedcomimportimportgedcom.glade]
# Merging
## [http:{{Code Browser}}ci/master/gramps.svn.sourceforge.net/viewvctree/gramps/trunkgen/srcmerge/Mergegramps/ srcgen/Mergemerge/*.py]## [http:{{Code Browser}}ci/master/gramps.svn.sourceforge.net/viewvctree/gramps/trunkgui/srcglade/gladegramps/ srcgui/glade/merge*.glade]
Some work in gramps40/gramps41 towards these ends:
 
* Method to_struct added to all gen.lib objects. Returns JSON-like dictionary self-documenting the fields/values recursively.
* to_struct used to find differences, gramps/gen/merge/diff.py
* Report based on diff:
 
[[File:Database-diff-report.png|thumb|400px|left|[https://github.com/gramps-project/addons-source/tree/master/Differences Database Differences Report] code on Github]]
{{-}}
=== Exporting ===
Currently exporting to [[gedcomGEDCOM]] and csv is limited to some information. Though [[gedcomGEDCOM]] is "standard" lingua franca of genealogy, it is inherently limited, particularly because various extant versions of [[gedcomGEDCOM]]. CSV has the advantage that it can be imported to any current spreadsheet, particularly [http://www.documentfoundationlibreoffice.org/download/ LibreOffice] or OpenOffice.org. What are the limitation of csv exports in grampsGramps?
CSV export/import is limited to the main objects in GRAMPSGramps. It was not designed as a general purpose import/export but rather an alternative input/output tool.
=== Merging ===
=== Comments ===
The above text is a raw outline only. The writer is not really familiar with gramps and has only offered to open a page in wiki to the Coordinator because everybody else seemed to be reluctant to do so. There is no doubt that this is a mere "bones" of the task and a very small step in potential programming task which can only occur if there is input from other persons interested in the topic and willing to discuss in the wiki style. There is some hope that such a discussion may take place as there has been a considerable exchange of thoughts and information in the developers' mailing list.
== Julio patch set ==
Julio custom coded merge code in the 2.2.x branch. You find them [http://cage.ugent.be/~bm/downloads/merge.patch here]. This code must be reviewed for 3has been integrated.::[http://sourceforge.1net/mailarchive/message.x php?msg_id=30346713 I think that that was referring to just a couple of functions for creating UUID strings, and integrated if neededthat has been incorporated into Gramps. So, I think it is done.Thanks! -Doug]
== UID, GUID and _UID, what is needed in GRAMPSGramps? ==
Gramps discussions:
* [http://gramps.1791082.n4.nabble.com/What-s-the-best-method-for-GEDCOM-merge-td1796085.html What's the best method for GEDCOM merge]
* [http://gramps.1791082.n4.nabble.com/Help-with-importing-a-backup-into-existing-database-td1802220.html Suggestion of two stage importer]
* [http://gramps.1791082.n4.nabble.com/Towards-database-synchonizing-tt4655412.html Towards database synchronizing]
* [http://gramps.1791082.n4.nabble.com/Questiions-on-gedcom-REFN-strategy-td1798208.html Questions on gedcom REFN strategy]
The discussion of UID fits with the merge problem. Some unofficial standard for UID we should perhaps follow:
* [httphttps://listsgroups.ldsossgoogle.orgcom/pipermailforum/ldsoss?fromgroups=#!forum/soc.genealogy.computing/2006-May/002298.html mail list discussion on ldsoss]:** [https://groups.google.com/forum/?fromgroups=#!search/Was:$20Software$20implementing$20Gentech$20Genealogical$20Data$20Model/soc.genealogy.computing/BMXOjIXQZdU/mjCP__aMWzIJ UUIDs (Was: Software implementing Gentech Genealogical Data Model)]
* [http://www.familysearchdevnet.org/downloads/gedcom/FS-TT1001.doc word document with the basics]
* [http://bettergedcom.wikispaces.com/message/view/home/29974421 Bettergedcom comments about UUID]
Julio has a patch against Utils.py to generate a UID, see [http://cage.ugent.be/~bm/downloads/uuid.patch here]
 
==Related Discussions==
*2013-01-13 [http://sourceforge.net/mailarchive/message.php?msg_id=30345408 Towards database syncing]
==Related Gramps Bug Numbers==
* #{{bug|684}}: REFN vs. INDI - ''Feature Request''* #{{bug|2370}}: Errors occur when importing or exporting gramps data to gedcom format* #{{bug|2623}}: Import Export Merge (GEPS 009) - ''Feature Request''* #{{bug|4169}}: To generate numbering class - ''Feature Request''* #{{bug|5125}}: Expand CSV support with AFN and REFN - ''Feature Request''* #{{bug|5253}}: Read and display the content of a .gramps into Gramps without import - ''Feature Request''* #{{bug|7072}}: A friendly way for recovery - ''Feature Request''
[[Category:GEPS|I]]

Navigation menu