Tree vivisection experiments with the Isotammi SuperTool

A more complex variation relates to the social conventions of “couverture”, where women take their husband’s surname.

This can make recognizing daughters difficult in documents like obituaries and family histories. Genealogy programs tend to list everyone by their birth surname and only store the Married Name as an alias. Although that follows guidelines, this seems backwards… since women tend to use the birth surname for less than a couple decades and live under the married surname for 3-5 times as long. So I prefer the Preferred Name to be the one they used most of their life… their Married name but the form that includes a ‘patrilineal’ as well as the ‘taken’.

So, rather than merely use Gramps “Married Name” type in the Names tab, I like to use the multiple names feature. The 1st name is Patrilinear in origin (using “U.L.N.” if unknown last name). So This script is run after the Patrilinear script. And subsequent name(s) are of ‘Taken’ origin – derived from their husband(s).

So I’d like to set the null-value Origins of Females’ 2nd-10th multiple names to “Taken”. (Ideally, it would be nice to only set those that have a spouse with a matching surname. But this seems to be too ambitious. We can add that as a later refinement.)

While collating a [list of SuperTool Scripts](https://www.gramps-project.org/wiki/index.php/Addon:Isotammi_addons#SuperTool_Scripts) to link in the wiki, discovered that the 2nd of two scripts was never added to this thread.

The original idea was to adapt the Discourse posting into a WikiMedia article. But seems that a Discourse plugin offers a rollover “copy” button for “code blocks” that is not available in our wiki. That button simplifies copying the code to a new .script file that can be loaded by SuperTool. (Eliminating the need to transcribe one text box at a time. Yay!)

Copy the script below, create a new text file and save it as “set-surname-origin-to-taken.script”. Save it to a folder you can find easily when it is time to load it into SuperTool. (Or make finding the folder in the future easier. Copy the path in the breadcrumbs of the Save dialog. And set a bookmark in the GTK File Chooser.)

So here is the SuperTool script written by Kari Kujansuu during the July 2021 eMail exchange: “Can this be done with SuperTool?

The lead-in will be refined in this posting over the next couple days.

[title]
set-surname-origin-to-taken

[description]
Goes through all female persons 
sets their surname type to TAKEN for all except the first surname within each name

[category]
People

[initial_statements]
from gramps.gen.lib import NameOriginType
counter = [0]

[statements]
if gender == "F":
	for nameobj in nameobjs:
		for  surnameobj in nameobj.get_surname_list()[1:]:
			if surnameobj.get_origintype() == NameOriginType.NONE:
				surnameobj.set_origintype(NameOriginType.TAKEN)
				print(name,": set to TAKEN:",surnameobj.get_surname())
				counter[0] += 1

[filter]

[expressions]
"names updated:", counter[0]

[scope]
selected

[unwind_lists]
False

[commit_changes]
True

[summary_only]
True