This is a spin-off from a recent thread on copying source records between projects. I was struck by the observation that this is quite a common question, but there is no easy solution other than fairly complex workarounds requiring several separate steps.
I originally suggested a Wish List item, but on reflection feel that it is unlikely to be a significant priority for CP in the medium term. However, it's a problem that is very amenable to a plugin solution, and a suitable draft is available from this link.
This first prototype has a very simple menu, as shown, with just Export and Import options.
Selecting Export presents a standard FH window for selecting one or many Source Records. Clicking on OK exports these records to an external file, along with any linked records such as Media, Repository, Note/Research Note, or FH7 Template. Linked records can be as deeply nested as required, so for example, if a Source Record has a linked Note, which in turn has linked Media, all these records are included automatically.
FH7 Rich Text is maintained, although any record links are converted to plain text, as these are unlikely to be relevant in the destination project.
Records are saved in xml format rather than GEDCOM, as the output file is intended solely for use with this plugin, rather than being imported as a standard GEDCOM file. This is a standard industry format, so can be viewed if required in either a text editor or any xml viewer, such as a web browser.
Selecting Import adds all the records to the current project, which can be either blank or already populated, and recreates the links between records. Import is unconditional, so does not search for any similar existing records or attempt to merge records. This is similar to the "add GEDCOM" facility that is available in some apps (but not currently FH) to add records from a GEDCOM file into an existing project.
If the imported records contain Media files stored within the source project folder, it presents an option to copy these files to the Media folder of the destination project, copying the folder structure as required. Note that while selecting Edit - Undo Plugin Updates from the main FH menu undoes the addition, it does not delete these files.
The plugin is designed to be universally applicable, so works in both FH6 and FH7 while fully supporting non-English file paths, and is fully functional in WINE and Crossover for Mac/Linux users. It also supports FH7 Templated Sources if required, copying both the Source Records and the linked Templates. The only restriction is that the exported file cannot be imported back into the source project, and the source and destination must both be the same FH major version (i.e. 6 or 7) in order to prevent any issues with compatibility.
The plugin makes no changes whatsoever to the source project, so can be used with any project. The destination project is of course updated, so it is probably best to practice with the Sample Project or a new empty project.
Is it useful? Does it work as expected, or have I missed anything?
My intention is to keep the link at the top of this post updated so that it always points to the most recent revision.
* Copy Sources between Projects - New Draft Plugin
- Mark1834
- Megastar
- Posts: 2653
- Joined: 27 Oct 2017 19:33
- Family Historian: V7
- Location: South Cheshire, UK
Copy Sources between Projects - New Draft Plugin
Mark Draper