Jump to content
TNG Community

Ancestry gedcom


mimohoorn

Recommended Posts

Hello,

I've imported the GEDCOM that I have exported from my Ancestry account (around 500 persons)

As I was getting along with my TNG website (montijn.com) I have added alot of new persons and also uploaded various pictures.
A few of these pictures I was able to connect with the new persons I have added.

Now I want to connect some pictures to persons that I have imported with the GEDCOM file and somehow I'm not able to connect any picture with any imported person.

Who has got an answer for me?

Link to comment
Share on other sites

thank you @manofmull

I checked my personslist and noticed that all the GEDCOM persons have P.
All new added persons have I (eye).

How can I make sure that all persons that are in my list have the same starting letter?

And what letter is best to use?

Link to comment
Share on other sites

'I' is generally better. You can edit a gedcom before uploading to change all the 'p's to 'I'

Link to comment
Share on other sites

I have 500+ persons with a P.

I have the GEDCOM on standby. Is there a program where I can edit this problem?

Link to comment
Share on other sites

A gedcom is a text file. Get something like notepad ++ and it has a search and replace function.

Link to comment
Share on other sites

If I get to change the GEDCOM file and upload it to my current tree, will it replace all current entries? Or do I get every person double because of the P & I problem?

Link to comment
Share on other sites

28 minutes ago, manofmull said:

I believe you want to use the standard I (eye) prefix. You can delete everyone on site that has P.

When you upload your new gedcom, everyone on site will be I (eye)

It's personal preference of course, but I export everything from my desktop software, Family Historian, which does use  'I' but doesn't display it, just the numeric protion.  However, since I find, even with improved font, TNG person ID display leaves the 'I' and the '1' difficult to distinguish, I alter all gedcom records (nearly instantly with an editor macro) from 'I' to 'P' and set TNG to 'P'.  Have never regretted it.

In your case, since 'P' is already present in the Gedcom,  and you wish to keep that prefix, it would be best to set TNG default to 'P', then start over and rebuild TNG from that gedcom.

Alternatively, if you wish 'I' , as has been suggested, use an editor and do a quick search/replace of 'P' to 'I'.

Ron

Link to comment
Share on other sites

Since I have less "I" persons, I will try to change them in to "P" and change the setup aswell.

Since it's now 11 pm here in holland I will try to fix it tomorrow or in the weekend.

I will let you all know if it worked.

For now thanks for your help👍

Link to comment
Share on other sites

5 hours ago, manofmull said:

Ron

I'd appreciate the macro and how to use it. Would love my site to have prefix P but terrified of breaking so many media links

Realize I  'clear' (not delete) my TNG database tree with every import, so this might not work for you. Also, I misstated; I don't use a macro, since it's simpler to open the gedcom, do a find all '@I', replace all '@P', save, and that's it!   I use RJ TextEd, an excellent free program. But there are others which will work just as well.  All of your media links within the gedcom will be preserved.  It is wisest first to find all and review the result list to make sure all are 'INDI' records. In 250,000 gedcom records, all my '@I' were in 'INDI' records. And of course TNG:Admin:Setup Prefix must be set to 'P'.

That's all I do as far as prefix assignment.  I should also add, that I was able to test this on a local WampServer, a test website, before going 'Live'.  And even there, I relied on having my host server backups ready if I need them.  Can never have too many safeguards in place.

2018-02-08_16-12-24.jpg

2018-02-08_16-17-32.jpg

Hope that helps.

Ron

Link to comment
Share on other sites

What I did was I exported my tree (with the P and I mixed) and saved the GEDCOM without any extra's (because I have no documents and pictures linked to a person).

I uploaded the GEDCOM to a new tree @ my ancestry.com  account and after I checked if all the new persons where included, I Downloaded the GEDCOM from Ancestry and Uploaded it to a new tree on my website.

All the previous I (eye) persons are now a P and by changing the Setup Prefix to P, I am now able to connect the pictures as I wanted it.

Thank you all for your help en comments.

Greetings from the Netherlands

Link to comment
Share on other sites

I have a mix of both I and P in my GEDCOM which may explain why Ancestry is losing a couple of thousand people when I upload it.


The problem is I can't simply change @P to @I because the same number is being used for both in some cases.

0 @I837@ INDI^M
1 NAME John Samuel /BOOTH/^M
 

0 @P837@ INDI^M
1 NAME John /Kettle/^M
 

How would one deal with that particular situation?

 

Link to comment
Share on other sites

I must say that I only checked the number of people that I exported from TNG to ancestry and back. Since I had only about 550 persons at that time, it was worth a shot.

If it didn't work, I would have tried an offline program.

I'm still checking if there are no personlinks are broken. At this moment everything is fine at my database.

Maybe an extra warning for the TNG wiki like:

ancestry exports to P,

MH exports to.....

Etc.

Greets from holland

Michael aka mimohoorn

Link to comment
Share on other sites

I just wrote a quick perl script that reads my gedcom into an array, finds the highest @I number, adds 1 then it finds the first @P numbers and iterates through a copy of the array replacing the @P with the I@ and the highest number. Loaded the new gedcom up to Ancestry and the missing individuals are there.

I've attached the perl file in case it's of use to anyone else. Should be easy enough to convert to php or whatever. 

readtree.pl

Link to comment
Share on other sites

Access PHPMyadmin and go to the People table.

What your are looking for is the column personID and this will enable yo to sort easily.

Link to comment
Share on other sites

No, no no. You can't just do it like that, I don't think. 

First, if you try to change P to an I and keep the same number, it'll possibly fail because you could have I200 and P200. You'd end up with a duplicate number for different people.

Consider this.

mysql> select * from tng_people limit 1\G
*************************** 1. row ***************************
            ID: 1
        gedcom: tree1
      personID: I1
      lnprefix: 
      lastname: Reed
     firstname: Nigel

 

So, I've got an ID of 1 and a personID of I1. Now, if Darrin has used ID rather than personID everywhere, then great, but he didn't so we're stuck with this situation.

 

mysql> select * from tng_families limit 1\G
*************************** 1. row ***************************
        ID: 1
    gedcom: tree1
  familyID: F1
   husband: I1
      wife: I2
 

In the families I am I1 and my wife is I2. If we'd used ID then any changes to the people table would be reflected in the families since it'd be linked by ID. So, if I change I1 in the people table then I also have to change it in the family table.

mysql> select * from tng_children where familyID='F1'\G
*************************** 1. row ***************************
         ID: 566
     gedcom: tree1
   familyID: F1
   personID: I494
 

For example, personID here is I494 so if it was P494 I'd have to change it in the people, children, and families tables...

 

The easiest way to do it is to export the GEDCOM, use a script and then reimport it.

 

 

Link to comment
Share on other sites

OK, I've written a php version of the perl script. You can use it two ways. If you have access to your linux shell just run

 

php readtree.php

 

As before, the gedcom is hardcoded to tree1.ged but you can change the script. It outputs phptree.ged

 

If you only have access to a web server you can upload it to your TNG directory along with tree1.ged (or whatever file you want to use and changed the script) then browse your http://tng.site/readtree.php

One thing to note, with 2800 substitutions in my file, it took about 3-4 minutes to run. If the server is in safe_mode you can try commenting out the set_time_limit but it's unlikely to run properly and will time out. Also, it needed more than the default 128MB of memory, I increased mine to 256MB and it worked. I don't know if people will have more or less than I did but at least it's a start.

Of course, check your new file to make sure it's sane before deploying it anywhere. I can't be held responsible for you destroying your one and only gedcom/family tree.

readtree.php

Link to comment
Share on other sites

13 hours ago, manofmull said:

Nigel

Way over my old head !!.

My database is almost 75,000 names all with prefix I (eye). I'd like them all to be P.

There's almost 3000 media links to people with prefix I (eye).

Last thing I want is to break any links.

Can this be done with a mod ?

I went to the site CP, took one look and ran out (too scary to go there).

If ALL of your people have an I prefix AND there are no @P prefixes existing then you can use this command on the gedcom file, using tree1.ged as an example and ending up with newtree.ged

 

cat tree1.ged |perl -pe 's/\@I(\d+)\@/\@P${1}\@/g'>newtree.ged

 

This is a linux command line, of course. If you're on Windows then really I have no idea. You'd need to find and replace @I foilowed by 1 or more digits followed by @.

 

Using this method is a little safer than just replacing @I with @P just in case @I occurs anywhere in your GEDCOM other than as a persona identifier. If you're 100% sure that @I is only used in people fields you can just load up your gedcom and globally replace @I with @P and see how it goes.

 

Link to comment
Share on other sites

17 hours ago, Nigel Reed said:

Using this method is a little safer than just replacing @I with @P just in case @I occurs anywhere in your GEDCOM other than as a persona identifier. If you're 100% sure that @I is only used in people fields you can just load up your gedcom and globally replace @I with @P and see how it goes.

If (a big if) you are able to go the gedcom route, and use an editor (such as RJ TextEd) which shows you results of the 'search' or 'find' (all) before the 'replace' (all), you can easily scroll through and visually inspect the results before the doing the replace.  And, to overstate the obvious, you do backups of your gedcom first.  Then a simple find '@I' to '@P' is all that's necessary.

Ron

Link to comment
Share on other sites

  • 5 months later...
Dave Violette

I got into this thread just now and offer the Change Prefix mod by Chris Moss. It will change from I to P (or whatever you choose) in all database tables.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...