* Change Any Fact Tag Plugin

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
avatar
nomadandy
Gold
Posts: 10
Joined: 09 Oct 2010 08:10
Family Historian: V6.2
Location: Thailand

Change Any Fact Tag Plugin

Post by nomadandy » 18 Oct 2013 06:59

Hi,

I have been experimenting with this plugin with a view to changing existing custom census events to CENS events, and while on the surface it appears to work, I notice that in the test Gedcom I have been using the actual entry remains as it originally was (i.e. not CENS, but EVEN, etc.).

Is it in fact possible to globally change an event at this level, or does it require either a Gedcom file edit or a re-entry of such events as required?

Thanks in anticipation for any help!

Andy

User avatar
Valkrider
Megastar
Posts: 1534
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Change Any Fact Tag Plugin

Post by Valkrider » 18 Oct 2013 07:05

Andy

One way to do this is with a plain text editor. I use the free Notepad++. Just open the gedcom file and then do a search and replace. Notepad++ understands Regex and you can programme it using a Regex statement to only change the events you want to CENS from EVEN. Do this on a copy of your Gedom in case you make a mistake though.

avatar
nomadandy
Gold
Posts: 10
Joined: 09 Oct 2010 08:10
Family Historian: V6.2
Location: Thailand

Re: Change Any Fact Tag Plugin

Post by nomadandy » 18 Oct 2013 07:09

Thanks Colin,

I had a feeling that was the best way to approach it!

Andy

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Change Any Fact Tag Plugin

Post by Jane » 18 Oct 2013 07:30

Mike's plug in normally works fine for this, did you remember to save the file in FH after you had run the plugin?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
nomadandy
Gold
Posts: 10
Joined: 09 Oct 2010 08:10
Family Historian: V6.2
Location: Thailand

Re: Change Any Fact Tag Plugin

Post by nomadandy » 18 Oct 2013 07:53

Hi Jane,

Yes, I even saved it a couple of times while going backwards and forwards between applications!

What started me on this was using Family Tree Analyser, which apparently only picks up genuine CENS or RESI entries from the Gedcom, and which of course couldn't see any of my census entries which have always been customized to specific years and places.

Having used the plugin for all my 1881 census entries, converting from my custom event Census 1881 (3 Apr) to the standard Census event, within FH everything does appear to have changed, however, on checking the Gedcom for specific individuals, the text still reflects the original EVEN ... TYPE Census 1881 (3 Apr).

The even stranger thing is that FTA sees my custom 1911 Census events, but that is really a separate issue that I have asked the developers about.

Andy

User avatar
Jane
Site Admin
Posts: 8442
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Change Any Fact Tag Plugin

Post by Jane » 18 Oct 2013 08:13

Very strange, especially if it looks right in FH. Just in case there is something strange with the files.

I have attached a plug in I use all the time which launches the currently open file in PSPAD. Just change the strProgram line to your preferred text editor.
PSPad - Edit Current Gedcom.fh_lua
(338 Bytes) Downloaded 207 times
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
nomadandy
Gold
Posts: 10
Joined: 09 Oct 2010 08:10
Family Historian: V6.2
Location: Thailand

Re: Change Any Fact Tag Plugin

Post by nomadandy » 18 Oct 2013 08:34

Many thanks Jane. I will give the plugin a try and see what I can discover!

Andy

avatar
nomadandy
Gold
Posts: 10
Joined: 09 Oct 2010 08:10
Family Historian: V6.2
Location: Thailand

Re: Change Any Fact Tag Plugin

Post by nomadandy » 18 Oct 2013 09:08

Hi Jane,

Your plugin seems to have helped, and indeed the event has changed from its original form to CENS for the test cases.

I will investigate further why things are not working as they should with FT Analyser.

Many thanks for your help.

Andy

avatar
nomadandy
Gold
Posts: 10
Joined: 09 Oct 2010 08:10
Family Historian: V6.2
Location: Thailand

Re: Change Any Fact Tag Plugin

Post by nomadandy » 18 Oct 2013 10:14

Just to close out this query:

My mistake was loading the incorrect Gedcom file in the editor all the time. When I created a copy to test, it went to the Public folder of my existing FH project, whence I loaded it into a new project in FH via the project window. When I checked the text editor, I was looking at the copy of the Gedcom in the public folder NOT at the one in the new project!

Apologies and many thanks to Jane and Colin who helped solve the problem. It all seems to be in good order now, and I can confirm that the plugin DOES indeed change the core events.

Next time I create a test copy, at least I shall be aware of this issue.

Andy

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Change Any Fact Tag Plugin

Post by tatewise » 18 Oct 2013 10:33

The best way to create a test copy is to use the Project Window > More Tasks > Copy Project for just the Project File and Project Data subfolder and then if necessary strip down the GEDCOM using File > Split Tree Helper or File > Import/Export > Export > GEDCOM File and then run the tests.

Alternatively, add some sample data to the Family Historian Sample Project and run the tests on that.
You may need to use Project Window > More Tasks > Samples > Reset Sample Project before and after this process to obtain the pristine sample project.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
nomadandy
Gold
Posts: 10
Joined: 09 Oct 2010 08:10
Family Historian: V6.2
Location: Thailand

Re: Change Any Fact Tag Plugin

Post by nomadandy » 18 Oct 2013 10:55

Thanks Mike,

I'll use the copy project method next time.

Andy

Post Reply