* Search and Replace Plugin

Writing and using plugins for Version 5 and above.
Post Reply
User avatar
dewilkinson
Famous
Posts: 177
Joined: 04 Nov 2016 19:05
Family Historian: V6.2
Location: Oundle, Northamptonshire, England
Contact:

Search and Replace Plugin

Post by dewilkinson » 30 Jun 2020 07:16

I make extensive use of this very helpful plugin, particularly because I use a number of unique abbreviations to speed up data entry and convert them at the end of each month before I update my website. A couple of examples are v: = volume: mmn = mother's maiden name.

A very useful enhancement would be that it doesn't exit after completing a run reverting to the options screen. It is a little tedious having to restart it each time. If the plugin doesn't find anything it leaves the options screen open. The problem might be that you can't look at the results query output if it makes replacements, if so, could an option to leave open be added, default off?
David Wilkinson researching Bowtle, Butcher, Edwards, Gillingham, Overett, Ransome, Simpson, and Wilkinson in East Anglia

Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them

User avatar
tatewise
Megastar
Posts: 18445
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Search and Replace Plugin

Post by tatewise » 30 Jun 2020 09:22

Hi David,
I have moved this to the Plugin Discussions Forum.

When nothing is found the popup window says No matching items have been replaced/reported.

How about always having a similar popup window saying how many matching items have been replaced/reported?
That window could have two buttons, one to Continue and one to Close the Plugin instead of the single OK button.

When the Plugin eventually closes, the Result Set would list the entire series of items replaced/reported.

There is one snag I can think of...
If you perform a series of various replacements there will be only one Result Set and Edit > Undo Plugin Updates will be an all or nothing option, so if one of the various replacements did not work as expected you cannot roll back just those changes.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
dewilkinson
Famous
Posts: 177
Joined: 04 Nov 2016 19:05
Family Historian: V6.2
Location: Oundle, Northamptonshire, England
Contact:

Re: Search and Replace Plugin

Post by dewilkinson » 30 Jun 2020 09:45

Mike,

That sounds the sort of solution I was looking for. I think an explicit warning would need to be visible about the potential consequences of repeat runs if you haven't taken a GEDCOM file backup first, which I always do as it takes seconds before using this plugin.
David Wilkinson researching Bowtle, Butcher, Edwards, Gillingham, Overett, Ransome, Simpson, and Wilkinson in East Anglia

Deterioration is contagious, and places are destroyed or renovated by the spirit of the people who go to them

User avatar
tatewise
Megastar
Posts: 18445
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Search and Replace Plugin

Post by tatewise » 30 Jun 2020 10:36

Firstly, taking a GEDCOM backup is often unnecessary as the default Snapshot backups may suffice.
Secondly, such a backup is no better than Edit > Undo Plugin Updates as they are both an all or nothing option.
Neither option will allow you to undo just a subset of the multiple replacements.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply