Page 1 of 1

Quick Family Facts

Posted: 25 Apr 2022 15:46
by Jean001
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

Re: Quick Family Facts

Posted: 25 Apr 2022 17:22
by tatewise
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

Re: Quick Family Facts

Posted: 25 Apr 2022 18:46
by Jean001
Thank you, Mike.

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

Re: Quick Family Facts

Posted: 25 Apr 2022 19:41
by Jean001
Thank you again Mike. That suits me perfectly.

The explanations were helpful too.

Jean

Re: Quick Family Facts

Posted: 28 Apr 2022 14:49
by fhtess65
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>

Re: Quick Family Facts

Posted: 28 Apr 2022 14:59
by ColeValleyGirl
Tools > Plugins, then the More button which reveals an extra set of buttons to the right. Select the relevant plugin and the Edit

Re: Quick Family Facts

Posted: 28 Apr 2022 16:03
by tatewise
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.

Re: Quick Family Facts

Posted: 29 Apr 2022 04:39
by fhtess65
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

Re: Quick Family Facts

Posted: 29 Apr 2022 04:39
by fhtess65
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.