* Quick Family Facts

Writing and using plugins for Version 5 and above.
Post Reply
avatar
Jean001
Gold
Posts: 20
Joined: 03 Mar 2021 11:49
Family Historian: V7

Quick Family Facts

Post by Jean001 » 25 Apr 2022 15:46

I am finding this plugin very useful (thank you Mike). The colour coding of individuals is a clever aid. The bonus is that I can copy and paste the text into my word processor.

I have no ability with writing or adapting plugins to my requirements other than very minor changes (e.g. in this plugin, changing some of the section titles).

I have a couple of problems.

My 'Places' are entered/stored in 'reverse' order (e.g. country first) with ten comma-delimited sections. So the plugin produces output in that order. Is it possible to adapt the plugin to reverse the order, and to 'TIDY' the excess commas? (I am able to deal with the commas in the word processor, but it would be quicker if they were removed by the plugin.)

Are the events sorted by date order? Is it possible to change the order of events? I would prefer: birth, chr, death, burial, then marriage(s). I have some 'complicated' families and this change adds some clarity to my reports.

Thank you.

Jean
Jean

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

Re: Quick Family Facts

Post by tatewise » 25 Apr 2022 17:22

Yes, Jean. Those two changes are feasible.

1) Reverse & Tidy Places
Find the function LoopFacts (...) at about line 147.
After the line if #strFact > 0 then and before the line table.insert(arrList,"\t"..strFact) insert the code as shown below:

Code: Select all

			if #strFact > 0 then
				local strPrefix, strPlace = strFact:match("^(.- in )(.-)$")
				if strPrefix and strPlace then
					strPlace = fhCallBuiltInFunction("TextPart",strPlace,1,0,"TIDY_REV")
					strFact = strPrefix..strPlace
				end
				table.insert(arrList,"\t"..strFact)	
That splits the fact description on the word in to extract the Place name.
Then invokes the =TextPart(...) function to tidy and reverse the parts.

2) Change Event Order
On about line 99 change array of events so that marriage, divorce & separation come after death, burial & cremation:

Code: Select all

		arrArray.Events = { { "~.BIRT"; "~.BAPM"; "~.CHR"; }; { "~.DEAT"; "~.BURI"; "~.CREM"; }; { "~.MARR"; "~.DIV"; "~.EVEN-SEPARATION"; }; }
Later on about line 215 change the intFacts == 2 test as follows so it applies to 3rd set of facts above:

Code: Select all

				if intFacts == 3 then
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Jean001
Gold
Posts: 20
Joined: 03 Mar 2021 11:49
Family Historian: V7

Re: Quick Family Facts

Post by Jean001 » 25 Apr 2022 18:46

Thank you, Mike.

I'll read, digest, make the changes, and report back.
Jean

avatar
Jean001
Gold
Posts: 20
Joined: 03 Mar 2021 11:49
Family Historian: V7

Re: Quick Family Facts

Post by Jean001 » 25 Apr 2022 19:41

Thank you again Mike. That suits me perfectly.

The explanations were helpful too.

Jean
Jean

User avatar
fhtess65
Famous
Posts: 244
Joined: 15 Feb 2018 21:34
Family Historian: V7
Location: British Columbia, Canada
Contact:

Re: Quick Family Facts

Post by fhtess65 » 28 Apr 2022 14:49

Hi Mike,

Where does one access the code in this plugin, or any plugin, for that matter.

Thanks :)

Teresa
tatewise wrote:
25 Apr 2022 17:22
Yes, Jean. Those two changes are feasible.

1) Reverse & Tidy Places
Find the function LoopFacts (...) at about line 147.
After the line if #strFact > 0 then and before the line table.insert(arrList,"\t"..strFact) insert the code as shown below:
<snip>
---
Teresa Basińska Eckford
Librarian & family historian
http://writingmypast.wordpress.com

User avatar
ColeValleyGirl
Megastar
Posts: 3687
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Quick Family Facts

Post by ColeValleyGirl » 28 Apr 2022 14:59

Tools > Plugins, then the More button which reveals an extra set of buttons to the right. Select the relevant plugin and the Edit

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

Re: Quick Family Facts

Post by tatewise » 28 Apr 2022 16:03

See FHUG Knowledge Base Family Historian Plugins and follow the link to the Help file (v7): Plugins Dialog where details are explained. See also the Topic: Plugins.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
fhtess65
Famous
Posts: 244
Joined: 15 Feb 2018 21:34
Family Historian: V7
Location: British Columbia, Canada
Contact:

Re: Quick Family Facts

Post by fhtess65 » 29 Apr 2022 04:39

Thank you :)

T
ColeValleyGirl wrote:
28 Apr 2022 14:59
Tools > Plugins, then the More button which reveals an extra set of buttons to the right. Select the relevant plugin and the Edit
---
Teresa Basińska Eckford
Librarian & family historian
http://writingmypast.wordpress.com

User avatar
fhtess65
Famous
Posts: 244
Joined: 15 Feb 2018 21:34
Family Historian: V7
Location: British Columbia, Canada
Contact:

Re: Quick Family Facts

Post by fhtess65 » 29 Apr 2022 04:39

Thank you - I know I was being a bad librarian by not reading the KB.

T :)

tatewise wrote:
28 Apr 2022 16:03
See FHUG Knowledge Base Family Historian Plugins and follow the link to the Help file (v7): Plugins Dialog where details are explained. See also the Topic: Plugins.
---
Teresa Basińska Eckford
Librarian & family historian
http://writingmypast.wordpress.com

Post Reply