Difference between revisions of "Import Media Using GEDCOM"

From TNG_Wiki
Jump to navigation Jump to search
(add Getting Started category)
 
(39 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<br><font color=gray><div align="center" style="text-align: center;font-size: 300%; font-weight: bold; margin: 10px auto;"> '' Importing Media into TNG'' </div></font><br>
 
 
 
{|align=right
 
{|align=right
 
|__TOC__
 
|__TOC__
 
|}
 
|}
 +
This is one of several ways to load new media files to TNG. (See [[Getting Media into TNG]]) This technique is available only to administrators, and is appropriate when you want to upload media files in conjunction with the upload of GEDCOM data.
  
You can import media into TNG by checking the box in front of '''Import media if present''' in the TNG Admin ------> Import/Export screen.
+
With this procedure you must
'''Note''' that TNG only imports the media links in a gedcom. You still have to FTP the media to your site.
+
# Configure TNG's media folders with the PC file paths that are used in your GEDCOM files. (One time)
 +
# Upload a GEDCOM file as described in [[Import Data]]
 +
# Upload your media files to the appropriate media folders, using an [[FileZilla - FTP Client|an FTP Client]] or a File Manager utility.
 +
# Set the appropriate media collection for some of your files (as required).
 +
# Create Thumbnails for your media files.
  
A media item in the GEDCOM file is represented by a block of lines that might look similar to this on a Macintosh:
+
== Preliminaries ==
<pre>1 OBJE
+
 
 +
=== Local Folder Setup ===
 +
In almost all cases, you must have a set of media folders on your PC (whether a Windows PC or a Macintosh) that match the media folders on your TNG server.  In  order to be able to import the media links in a GEDCOM file you need to  have a set of folders on your local computer that "mirror" the  media folders in your TNG setup.  You will typically have folders named "photos", "documents", "headstones", and "histories", and possibly others, depending on what custom collections you have defined. The folder setup shown in this image is what is assumed by the other images showing paths from the GEDCOM file and settings in TNG[[File:FolderSetup.gif]]
 +
 
 +
===One Media Folder===
 +
Some  desktop programs, such as Family Tree Maker (which is associated with  Ancestry.com), cannot separate different types of media files into media  folders.  And, sometimes, the person managing a TNG site may decide not  to use separate media folders.  In those cases, there whould be just one PC media folder and one one media folder on the TNG server, and all of the media types in TNG Admin >> Setup >> '''Import  Settings''' >> Local foldername Path(s) will specify the same  folder name.
 +
 
 +
=== GEDCOM Media Records ===
 +
A media item in the GEDCOM file is represented by a set of lines that might look similar to the examples just below.  Each line in a GEDCOM file is known as a  "segment" and is identified (not uniquely) by the keyword that follows the initial number. A GEDCOM "record" is a segment plus any subordinate segments (that start with larger numbers). The three examples below each show one hypothetical media record, and represent  MacIntosh, a  Windows PC, and a local PC's simulated Linux environment.  The only  meaningful difference among the three is the FILE segment (on the second  line).
 +
 
 +
<span style="color: blue">Macintosh</span>
 +
 
 +
<pre>1 OBJE                              
 
2 FORM jpg
 
2 FORM jpg
 
2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/people/RogerOval.JPG
 
2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/people/RogerOval.JPG
Line 18: Line 33:
 
2 _SIZE 147.000000 193.000000</pre>
 
2 _SIZE 147.000000 193.000000</pre>
  
or on Windows
+
<span style="color: blue">or on Windows</span>
  
 
<pre>1 OBJE
 
<pre>1 OBJE
Line 29: Line 44:
 
2 _SIZE 147.000000 193.000000</pre>
 
2 _SIZE 147.000000 193.000000</pre>
  
or if you are also using a local Wamp Server on your Windows computer
+
or if you are also using a local Wamp Server on your Windows computer with  the media for this linked to your genealogy software as well as to the <span style="color: blue">Wamp server</span>.
  
 
<pre>1 OBJE
 
<pre>1 OBJE
Line 40: Line 55:
 
2 _SIZE 147.000000 193.000000</pre>
 
2 _SIZE 147.000000 193.000000</pre>
  
See the following TNG Forum entries by Roger Moffat:
+
=== Local Paths ===
 +
Note that the GEDCOM media records specify a full file path and file name for the media file.  There are two related complicating factors:
 +
# The file path from the device root to the collection folder will be different on the web server, and
 +
# The specified file path may include folders '''below''' the collection folder.
 +
For instance, looking at the Macintosh example above, the partial path "~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos" represents the path to the collection folder (for photos, in this case), and the partial path "people/" indicates that the file is to be stored in a folder '''below''' the collection folder. As far as TNG is concerned, the filename is people/RogerOval.jpg.
  
* [http://www.tngforum.us/index.php?s=&showtopic=4653&view=findpost&p=22318 on relative links]
+
You have to tell TNG what your ''local'' paths for the media so that TNG can strip off that portion of the path when it imports the GEDCOM file. You do that in the Administration >> Setup >> Import Settings screen as shown below. (Note  that this screen shot is "doctored" to show the paths on multiple lines  so that the whole field contents can be seen.)
* [http://www.tngforum.us/index.php?s=&showtopic=4043&view=findpost&p=18983 on local paths]
 
* [http://www.tngforum.us/index.php?s=&showtopic=3077&view=findpost&p=14306 on import settings]
 
  
== Local Folder Setup ==
+
If you know your local collection path, then you can just enter it in the form.  Or, you can look at a FILE segment of your GEDCOM file and extract the path to and including the collection folder ("photos", "documents", "histories", etc.).
  
In order to be able to import the media links in a GEDCOM file you need to have a set of folders on your local computer that "mirror" the various media folders in your TNG setup. For example on your computer create a folder called "Genealogy Media" (in my examples above and below the folder is called "ReunionPictures") and inside that a set of folders that matches your TNG media folders. So for example:
+
[[Image:ImportSettings.gif]]
  
[[Image:FolderSetup.gif]]
+
Note that there is an entry (i.e. a field) on the form below for each standard TNG media collection, because it is generally assumed that you will separate the collections in different folders.  But some of these fields need multiple paths in them because desktop genealogy  software doesn't necessarily recognise all of the different media types  that TNG allows. So for example in the photos field I have entered the  path to the photos folder, and also the path to the headstones folder.  
  
shows the 5 folders I have set up on my local computer to store the various types of media item that are linked in my desktop genealogy software. These folders mirror the folders that are specified in the TNG Admin ------> Setup ------> General Settings ------> Paths and Folders
+
'''Note:''' separate multiple paths by a comma, do NOT include a space, but DO include the trailing / at the end of each path.
  
== Local Paths ==
+
'''Note:'''  if you're using Windows the paths in the GEDCOM file are probably  separated by a backslash '''\''' not a forward slash '''/'''. If this is  the case make sure you use the '''\''' in the paths in the import  settings.
  
You have to tell TNG what your local paths for the media are in TNG Admin ------> Setup ------> Import Settings screen as shown below. (Note that this screen shot is "doctored" to show the paths on multiple lines so that the whole field contents can be seen.)
+
('''Note''' that the first path listed for  each Local Path type is used if you Export a GEDCOM file out of TNG and  you choose to "Export media links")
  
[[Image:ImportSettings.gif]]
+
This can be necessary because on initial import from the GEDCOM file, TNG looks at the line that starts 2 _TYPE to see if it is importing a photo or a document or a headstone to then know what Collection to put it into. But since most desktop genealogy software only make distinction between PHOTO and DOCUMENT (or as Reunion specifies it a PHOTO DOCUMENT) it's necessary to "cover the bases" with the settings in TNG to ensure that the paths are imported successfully.
 
 
Some of these fields need multiple paths in them because desktop genealogy software doesn't necessarily recognise all of the different media types that TNG allows. So for example in the photos field I have entered the path to the photos folder, but also the path to the documents folder and the path to the headstones folder.
 
 
 
('''Note''' that the first path listed for each Local Path type is used if you Export a GEDCOM file out of TNG and you choose to "Export media links")
 
 
 
This can be necessary because on initial import from the GEDCOM file, TNG looks at the line that starts 2 _TYPE to see if it is importing a photo or a document or a headstone to then know what Collection to put it into. But since most desktop genealogy software only make distinction between PHOTO and DOCUMENT (or as Reunion specifies it a PHOTO DOCUMENT) it's necessary to "cover the bases" with the settings in TNG to ensure that the paths are imported successfully.
 
  
 
So using the GEDCOM line from the 1st example above
 
So using the GEDCOM line from the 1st example above
Line 80: Line 91:
 
we can see that it's a match up to the end of "photos/".  
 
we can see that it's a match up to the end of "photos/".  
  
So on import of this line, TNG will strip off the specified "Local Photos Path(s)" and import this item into the Photos collection as
+
So on import of this line, TNG will strip off the specified "Local Photos Path(s)" and import this item into the Photos collection as
  
 
<pre>people/RogerOval.JPG</pre>
 
<pre>people/RogerOval.JPG</pre>
Line 86: Line 97:
 
If the linked file is a headstone - for example
 
If the linked file is a headstone - for example
  
<pre>2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg</pre>
+
<pre>2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg</pre>
  
 
with the line
 
with the line
Line 96: Line 107:
 
<pre>~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/</pre>
 
<pre>~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/</pre>
  
to ensure that the item is imported correctly, with the matching part of the "Local Photos Path(s)" stripped off so that this item would be imported into the Photos collection as
+
to ensure that the item is imported correctly, with the matching part of the "Local Photos Path(s)" stripped off so that this item would be imported into the Photos collection (see below for notes on changing  this to the Headstones collection) as
  
 
<pre>NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg</pre>
 
<pre>NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg</pre>
  
After the import has completed you need to then "Convert" such items to their correct collection using the TNG Admin ------> Media screen.
+
'''Note'''  that the use of sub-folders within the 5 different folders from above  is fully supported, and the headstone image HildaLinehamHeadstone.jpg is  stored in a folder "Rangiora" in a folder "Canterbury" in a folder  "NewZealand" in my "headstones" folder.
 +
 
 +
== Importing Media ==
 +
 
 +
When you are doing an import, you have to select the option to Import Media as shown below.
 +
 
 +
[[Image:ImportGEDCOMMedia.gif]]
 +
 
 +
== During the Import ==
 +
 
 +
Starting withing TNG9, the GEDCOM import process displays a status dashboard that pops up over the kick-off screen.  The dashboard shows a progress bar and a running count of certain types of GEDCOM tags.  The counts may not mean exactly what you might expect, but they are still useful progress indicators.<br/>
 +
[[Image:import_media_using_gedcom-dashboard.png]]
 +
 
 +
The dashboard is handy, but if an error occurs during the import, the dashboard just freezes, and the error messages are hidden.  To see error messages, you must select the "Old-style Import" option as you kick off the import.  That option produces a scrolling progress listing that shows every 10 occurrences of the same counts that the dashboard shows:
 +
[[Image:import_media_using_gedcom-old.png]]<br/>
 +
The scrolling progress can be hundreds of lines long, but at least it will show any error messages that occur.
 +
 
 +
== After the Import ==
 +
 
 +
After the import has completed you need to perform some other steps...
 +
 
 +
{{TNGver
 +
|ver=10.1.0
 +
|notes='''NOTE that for TNG 10.1.x and TNG 11 onwards''', TNG will assign media items to the correct collection as long as the folder names defined for a collection in TNG match up to a folder name in the path of that media item.
 +
 
 +
So in the above example of a headstone in the GEDCOM file
 +
 
 +
2  FILE  ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg
 +
 
 +
the first part of this path
 +
 
 +
2  FILE  ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/
 +
 
 +
matches the path specified for Headstones, so this item is automatically assigned the Headstones category on import.}}
 +
 
 +
If  you know that you have probably imported some items that will have been  put into the wrong collection then "Convert" such items to their correct collection using the TNG Admin ------> Media screen.  
 +
 
 +
Before TNG 10.1 - For the  headstone example shown above
  
 
[[Image:CollectionConversion.gif]]
 
[[Image:CollectionConversion.gif]]
  
Note that the use of sub-folders within the 5 different folders from above is fully supported.
+
Once  you think all of the media items are in the correct Collection, you  then need to generate the thumbnails for the newly imported media items.
 +
 
 +
[[Image: GenerateThumbs.gif]]
 +
 
 +
If  any media items are not found (often because they've not yet been  converted to the correct Collection, or because the proper "Local Photos  Path(s)" wasn't specified in the Import Settings screen), they will be  listed at the end of the Generate Thumbs operation. For example:
  
== Importing Media ==
+
[[Image:ThumbGenerationFailures.gif]]
  
When you are doing an import, you have to select the option to Import Media as shown below.  
+
shows  that generation of the thumbnail for the headstone used in the examples  above failed. This is because it was imported by TNG as a Photo, and  hadn't been converted to a Headstone prior to trying to Generate the thumbnail for it. See above for conversion to a Headstone, after which  the thumbnail is generated correctly.
  
[[Image:import_media.jpg]]
+
== Related Links ==
  
 +
{{: Media related links}}
 
[[Category:Media]]
 
[[Category:Media]]
 +
[[Category:Getting Started]]

Latest revision as of 11:56, 1 July 2018

This is one of several ways to load new media files to TNG. (See Getting Media into TNG) This technique is available only to administrators, and is appropriate when you want to upload media files in conjunction with the upload of GEDCOM data.

With this procedure you must

  1. Configure TNG's media folders with the PC file paths that are used in your GEDCOM files. (One time)
  2. Upload a GEDCOM file as described in Import Data
  3. Upload your media files to the appropriate media folders, using an an FTP Client or a File Manager utility.
  4. Set the appropriate media collection for some of your files (as required).
  5. Create Thumbnails for your media files.

Preliminaries

Local Folder Setup

In almost all cases, you must have a set of media folders on your PC (whether a Windows PC or a Macintosh) that match the media folders on your TNG server. In order to be able to import the media links in a GEDCOM file you need to have a set of folders on your local computer that "mirror" the media folders in your TNG setup. You will typically have folders named "photos", "documents", "headstones", and "histories", and possibly others, depending on what custom collections you have defined. The folder setup shown in this image is what is assumed by the other images showing paths from the GEDCOM file and settings in TNGFolderSetup.gif

One Media Folder

Some desktop programs, such as Family Tree Maker (which is associated with Ancestry.com), cannot separate different types of media files into media folders. And, sometimes, the person managing a TNG site may decide not to use separate media folders. In those cases, there whould be just one PC media folder and one one media folder on the TNG server, and all of the media types in TNG Admin >> Setup >> Import Settings >> Local foldername Path(s) will specify the same folder name.

GEDCOM Media Records

A media item in the GEDCOM file is represented by a set of lines that might look similar to the examples just below. Each line in a GEDCOM file is known as a "segment" and is identified (not uniquely) by the keyword that follows the initial number. A GEDCOM "record" is a segment plus any subordinate segments (that start with larger numbers). The three examples below each show one hypothetical media record, and represent MacIntosh, a Windows PC, and a local PC's simulated Linux environment. The only meaningful difference among the three is the FILE segment (on the second line).

Macintosh

1 OBJE                               
2 FORM jpg
2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/people/RogerOval.JPG
2 TITL Roger Moffat
2 NOTE Taken at the time of Kurt and Ann Christensen's wedding - 2 March 1996.
2 _TYPE PHOTO
2 _PRIM Y
2 _SIZE 147.000000 193.000000

or on Windows

1 OBJE
2 FORM jpg
2 FILE C:\My Documents\ReunionPictures\photos\people\RogerOval.JPG
2 TITL Roger Moffat
2 NOTE Taken at the time of Kurt and Ann Christensen's wedding - 2 March 1996.
2 _TYPE PHOTO
2 _PRIM Y
2 _SIZE 147.000000 193.000000

or if you are also using a local Wamp Server on your Windows computer with the media for this linked to your genealogy software as well as to the Wamp server.

1 OBJE
2 FORM jpg
2 FILE C:\www\htdocs\genealogy\photos\people\RogerOval.JPG
2 TITL Roger Moffat
2 NOTE Taken at the time of Kurt and Ann Christensen's wedding - 2 March 1996.
2 _TYPE PHOTO
2 _PRIM Y
2 _SIZE 147.000000 193.000000

Local Paths

Note that the GEDCOM media records specify a full file path and file name for the media file. There are two related complicating factors:

  1. The file path from the device root to the collection folder will be different on the web server, and
  2. The specified file path may include folders below the collection folder.

For instance, looking at the Macintosh example above, the partial path "~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos" represents the path to the collection folder (for photos, in this case), and the partial path "people/" indicates that the file is to be stored in a folder below the collection folder. As far as TNG is concerned, the filename is people/RogerOval.jpg.

You have to tell TNG what your local paths for the media so that TNG can strip off that portion of the path when it imports the GEDCOM file. You do that in the Administration >> Setup >> Import Settings screen as shown below. (Note that this screen shot is "doctored" to show the paths on multiple lines so that the whole field contents can be seen.)

If you know your local collection path, then you can just enter it in the form. Or, you can look at a FILE segment of your GEDCOM file and extract the path to and including the collection folder ("photos", "documents", "histories", etc.).

ImportSettings.gif

Note that there is an entry (i.e. a field) on the form below for each standard TNG media collection, because it is generally assumed that you will separate the collections in different folders. But some of these fields need multiple paths in them because desktop genealogy software doesn't necessarily recognise all of the different media types that TNG allows. So for example in the photos field I have entered the path to the photos folder, and also the path to the headstones folder.

Note: separate multiple paths by a comma, do NOT include a space, but DO include the trailing / at the end of each path.

Note: if you're using Windows the paths in the GEDCOM file are probably separated by a backslash \ not a forward slash /. If this is the case make sure you use the \ in the paths in the import settings.

(Note that the first path listed for each Local Path type is used if you Export a GEDCOM file out of TNG and you choose to "Export media links")

This can be necessary because on initial import from the GEDCOM file, TNG looks at the line that starts 2 _TYPE to see if it is importing a photo or a document or a headstone to then know what Collection to put it into. But since most desktop genealogy software only make distinction between PHOTO and DOCUMENT (or as Reunion specifies it a PHOTO DOCUMENT) it's necessary to "cover the bases" with the settings in TNG to ensure that the paths are imported successfully.

So using the GEDCOM line from the 1st example above

2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/people/RogerOval.JPG

in conjunction with the line

2 _TYPE PHOTO

which has told TNG that it's a photo, and from the first line from the Import Settings screen shot above

~/Documents/Documents/Genealogy/Roger/ReunionPictures/photos/

we can see that it's a match up to the end of "photos/".

So on import of this line, TNG will strip off the specified "Local Photos Path(s)" and import this item into the Photos collection as

people/RogerOval.JPG

If the linked file is a headstone - for example

2  FILE  ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg

with the line

2 _TYPE PHOTO

TNG will also think this is a photo, which is why the "Local Photos Path(s)" as specified above needs to also include

~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/

to ensure that the item is imported correctly, with the matching part of the "Local Photos Path(s)" stripped off so that this item would be imported into the Photos collection (see below for notes on changing this to the Headstones collection) as

NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg

Note that the use of sub-folders within the 5 different folders from above is fully supported, and the headstone image HildaLinehamHeadstone.jpg is stored in a folder "Rangiora" in a folder "Canterbury" in a folder "NewZealand" in my "headstones" folder.

Importing Media

When you are doing an import, you have to select the option to Import Media as shown below.

ImportGEDCOMMedia.gif

During the Import

Starting withing TNG9, the GEDCOM import process displays a status dashboard that pops up over the kick-off screen. The dashboard shows a progress bar and a running count of certain types of GEDCOM tags. The counts may not mean exactly what you might expect, but they are still useful progress indicators.
Import media using gedcom-dashboard.png

The dashboard is handy, but if an error occurs during the import, the dashboard just freezes, and the error messages are hidden. To see error messages, you must select the "Old-style Import" option as you kick off the import. That option produces a scrolling progress listing that shows every 10 occurrences of the same counts that the dashboard shows: Import media using gedcom-old.png
The scrolling progress can be hundreds of lines long, but at least it will show any error messages that occur.

After the Import

After the import has completed you need to perform some other steps...


Ambox notice.png NOTE that for TNG 10.1.x and TNG 11 onwards, TNG will assign media items to the correct collection as long as the folder names defined for a collection in TNG match up to a folder name in the path of that media item.

So in the above example of a headstone in the GEDCOM file

2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/NewZealand/Canterbury/Rangiora/HildaLinehamHeadstone.jpg

the first part of this path

2 FILE ~/Documents/Documents/Genealogy/Roger/ReunionPictures/headstones/

matches the path specified for Headstones, so this item is automatically assigned the Headstones category on import.

TNG 10.1.0


If you know that you have probably imported some items that will have been put into the wrong collection then "Convert" such items to their correct collection using the TNG Admin ------> Media screen.

Before TNG 10.1 - For the headstone example shown above

CollectionConversion.gif

Once you think all of the media items are in the correct Collection, you then need to generate the thumbnails for the newly imported media items.

GenerateThumbs.gif

If any media items are not found (often because they've not yet been converted to the correct Collection, or because the proper "Local Photos Path(s)" wasn't specified in the Import Settings screen), they will be listed at the end of the Generate Thumbs operation. For example:

ThumbGenerationFailures.gif

shows that generation of the thumbnail for the headstone used in the examples above failed. This is because it was imported by TNG as a Photo, and hadn't been converted to a Headstone prior to trying to Generate the thumbnail for it. See above for conversion to a Headstone, after which the thumbnail is generated correctly.

Related Links

Media Overview
Setup - Media

Using Collections

Adding Media

Body Text

Thumbnails

Image Maps

TNG version: 12.3.0
TNG version: 7.0

Information on Image Maps apply to TNG versions prior to TNG 13

Image Tags

TNG version: 13.0.0

Information on Image Tags apply to TNG v13 and later

Other Useful Articles

Some TNG Media Mods