fire-eggs / FamilyLines

A free, open-source genealogy application to track, organize, and share your family history.
12 stars 1 forks source link

Export to GED with Photos/Attachments Does Not Work #12

Closed fire-eggs closed 7 years ago

fire-eggs commented 7 years ago

CodeFuglee[CodePlex]

Open a .familyx file containing images/attachments2. Export to GED3. Browse to the folder where you exported the GED. See that there are no copies of the images or attachments.4. Open the GED file in an editor. See that the FILE reference reads quot\PathToFile\Images[Filename]quot.The export failed to create the Images, or Attachments, folders referenced in the FILE links. Need to confirm that if the folders are correctly created, that the GED can be imported into other programs (i.e. is 'PathToFile' correct?).

fire-eggs commented 7 years ago

hemashiv[CodePlex]
Done...fixed...checked in...could you do a sanity check for me...

fire-eggs commented 7 years ago

notonyournelly[CodePlex]
Sounds like a plan! Please proceed.

Thanks!

fire-eggs commented 7 years ago

hemashiv[CodePlex]

GEDcomExport.cs writes out the filename etc, but it does not copy the photo or attachments getting exported into any subfolder. There is a method Copy on the Photo class which copies file to application photos folder. This is private.

We would need this method or another public method that calls this method to copy the file into the images subfolder, so that when import takes place we can set the correct base path in GedcomRecordReader.cs: ReadMultimediaRecord: file.Basepath = _gedcomPath;. If you agree, I can make the necessary modifications.

fire-eggs commented 7 years ago

notonyournelly[CodePlex]
OK, I'm confused. I don't know where the PathToFile bit came from any more.

A re-reading of the GEDCOM standard suggests the relative path is sufficient. So for my example, an image file moms_wedding.jpg should be stored as a FILE reference images\moms_wedding.jpg.

It is, unfortunately, up to the individual programs to handle FILE references correctly. FamilyLines needs to be able to import what we exported, at the very least.

fire-eggs commented 7 years ago

notonyournelly[CodePlex]
The user should be able to ZIP the GED file and associated Images / Attachment folders. So if the user chooses to export the GED file to C:\My Documents\My Tree there should be the necessary Images / Attachments folders in C:\My Documents\My Tree. Any referenced images or documents should then be copied to the appropriate sub-folder.

For instance, an image might be named moms wedding.jpg. In this case the FILE reference, I believe, would then read \PathToFile\Images\moms wedding.jpg. To be able to transport the GED file to another system, the FILE reference cannot be to a particular path on the original system.

A re-reading of the GEDCOM standard might clarify the last supposition and could be confirmed by testing the exported GED and images with a different genealogy program.

fire-eggs commented 7 years ago

hemashiv[CodePlex]
I have debugged this. I found the problem statement. If my image file is : c:\temp\profilepic.jpg what should FILE reference read? Should the export copy profilepic.jpg into a folder accompanying the ged file? or just refer to the originall path and name?