* Export Gedcom File plugin adding text

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
gapperly
Gold
Posts: 26
Joined: 26 May 2007 22:05
Family Historian: V7
Location: Canada
Contact:

Export Gedcom File plugin adding text

Post by gapperly »

I use the Export Gedcom File plugin to create a file for import to a TNG website.

I use Ancestral Sources to create rich text formatted tables of census transcriptions in FH. In the Export Gedcom File plugin I select the TNG default Rich Text Formatting option "change rich text into HTML 5 format". The plugin changes the text of each entry in the first column of the census table from FirstName LastName to Record: "FirstName LastName".

Why does it do this and how can I prevent it?
Gerald Apperly
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Export Gedcom File plugin adding text

Post by tatewise »

The explanation is that there is no HTML 5 representation for internal database person record links.
External web hyperlinks can use the format <a href="https://...">...</a> but that won't work for person record links.
So the plugin takes the person's name in plain text and prefixes it with the label Record:

I guess (as you have not been specific) that you want to simply eliminate that label.

Unfortunately, that is one of very few labels that currently cannot be customised.
So the only option is to use a plain text editor on the exported GEDCOM file and replace each Record: " with " so you end up with "FirstName LastName"
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
gapperly
Gold
Posts: 26
Joined: 26 May 2007 22:05
Family Historian: V7
Location: Canada
Contact:

Re: Export Gedcom File plugin adding text

Post by gapperly »

The hyperlinks are not necessary as TNG creates a list of linked individuals. I should be able to use the Search and Replace plugin in LUA Pattern Mode to quickly edit the hundreds of census source records. Thanks for the prompt response.
Gerald Apperly
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Export Gedcom File plugin adding text

Post by tatewise »

Yes, that should work.
Set the Search Scope to Source Records (SOUR) unless you have person record links elsewhere to be removed.
Tick only the Text from Source fields option unless you also have Note & Description fields that may need correcting.
Set the Search box to <rec=%d+,".-"> and leave the Replace box empty.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
gapperly
Gold
Posts: 26
Joined: 26 May 2007 22:05
Family Historian: V7
Location: Canada
Contact:

Re: Export Gedcom File plugin adding text

Post by gapperly »

I further restricted the Scope to source type=census. The following criteria worked:
Search: Record: "(.-)"
Replace: %1
Gerald Apperly
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Export Gedcom File plugin adding text

Post by tatewise »

I don't understand how you set the Search Scope to source type=census.

It seems as if you are running the Search and Replace plugin on the exported GEDCOM file intended for TNG.
So you have opened that GEDCOM file in FH which will probably disrupt the format and make it unsuitable for TNG.
Did you see the closing Memo says: BEWARE: Using Family Historian may disrupt Gedcom file format ! ! !

I strongly advise against that method and suggest you use one of these two methods:
  1. Use a plain text edit on the exported GEDCOM file to replace Record: " with " as I suggested earlier.
  2. Make a copy of your original Project and use Search and Replace on that copy as I described earlier before using the Export Gedcom File plugin.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
gapperly
Gold
Posts: 26
Joined: 26 May 2007 22:05
Family Historian: V7
Location: Canada
Contact:

Re: Export Gedcom File plugin adding text

Post by gapperly »

I use the drop down list under Search Scope to select Source Records (SOUR). I then use the Select Records button beside the drop-down list and Filter for Type = census in the Select Records window.

You are right, I am running the Search and Replace plugin in FH on a file created with the Export Gedcom File plugin. After making the changes I need I run the Export Gedcom File plugin a second time to create the file I import into TNG. I am aware the final export file should not be opened in FH.

I have been using this process for some time and it seems to work well.
Gerald Apperly
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Export Gedcom File plugin adding text

Post by tatewise »

Gerald, I do not recommend that technique.
It may appear to work now with the features that you use now but that could change in the future.
I cannot predict what changes FH makes when it opens the TNG GEDCOM and you run the Search and Replace plugin.
I cannot guarantee the Export Gedcom File plugin will handle that hybrid TNG/FH GEDCOM correctly.

I have made a note to add the Record: label to the plugin label tab options so that it can be inhibited.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Export Gedcom File plugin adding text

Post by tatewise »

See the plugin attachment to RM7 -> FH7, lost some citation formatting, other citation questions (21649) posted today.

This prototype Export Gedcom File plugin, Labels Set B tab, now has options for the Record label bottom right.
If you clear the field then no Record: label will prefix the names of people with rich text record links.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
gapperly
Gold
Posts: 26
Joined: 26 May 2007 22:05
Family Historian: V7
Location: Canada
Contact:

Re: Export Gedcom File plugin adding text

Post by gapperly »

I will heed your advice and use the FH export GEDCOM facility to produce the initial working copy, then use Notepad++ to edit the plugin output file before uploading to TNG.
Thanks for providing the option to remove the Record label, however I may choose to leave it there to facilitate removal of the quotation marks as well.
Gerald Apperly
Post Reply