Adding data in kinship-report

Hello,
I’m looking for a way to add the ID of father, mother and spouse(s) to every person in the kinship report. That’s why it is not possible to see the relations between the persons in ascending/descending generations.
I hope my question is clear.
Thanks in advance

GRAMPS: AIO64-5.1.6-1
Python: 3.6.4 (default, Jan 23 2018, 13:17:37) …
BSDDB: 6.1.0 (6, 0, 30)
sqlite: 3.21.0 (2.6.0)
LANG: de_DE.UTF-8
BS: Windows

Reports → Text Reports → Kinship Report


Are you asking for something similar to the “Show Gramps ID” checkbox in Report Options to the Double Cousin report?

Hello and thanks for answering.
May be (I have no double cousin in my database). I would like to see which spouse is married with which children or who is parent of which cousin, and so on.

Double Cousin report is just an example of a Report that can optionally print a Gramps ID.

Are you looking for something like this?:

How could I see, who is father/mother of I0653? Who is husband of I0653?

That kind of drilldown to extended information (i.e., spouse and parents of the Grandchild I0653) is not in the Report.

I am having trouble thinking of how that could be added cleanly.

My idea is to add in the software “child of Ixxx” depending from “Grandchildren”, “Greatgrandchildren” and so on or under “Spouse of…” “Spouse of Ixxx”, with Ixxx like your example. But I cannot generate python-code.

For webtrees I developed such a module: “Extended Family”. See Webtrees Handbuch/Anleitung für Webmaster/Erweiterungsmodule/Großfamilie – GenWiki

1 Like

I’m not a Python coder either. But what you want exists in the engine.

There are modules in the Relationship calculator and Narrator. But the documentation is written for experts in the Sphinx documentation system. So it takes lots of experimentation to get anywhere with it.

image

And then puzzling out how the developer of the Kinship Report designates whether the person in the report section is a spouse or a direct descendant. Because you indicated that you want different data for those relationship types.

Danke für den Hinweis. Ich werde mich mal dort einlesen.

Hello,
how did you create the “Ixxx:” at the beginning of each line?

I hacked the built-in report into an Addon called Kinship Report2 that add a “Show Gramps ID” Option and pastes the ID at the beginning of the name.

Still trying to figure out the way to add parents (or spouse, where appropriate) descriptive phrases.

PM me with your eMail address if you need a ZIP file of that version. (It should be compatible with 5.x and 4.x Gramps.)

I’m not making any progress. The add the GrampsID pull request was rejected because it failed the Lint and Black testing. And there were a bunch of errors reported.

Hello again,
although I cannot understand the problems, I thank you very much for trying to help me.
I have now found my own way with some data sharing between Ahnenblatt and gramps and libreoffice, in case there is not an easy way to create a new kindhip report. It may be that I am the one and only who wants the IDs.

Greetings from Germany

You need to make a black command on this file. On linux, it will be:

black gramps/gramps/plugins/textreport/kinshipreport.py

Then make a new commit and push

2 Likes

Best option is to use Black as mentioned but if you don’t have it handy, you can find the issues Black is flagging in the Checks tab of the PR. Look for the red "X"s to find the error(s) and resolution(s) suggested by Black. The line numbers are a bit confusing - the ones shown in the image are the line numbers in the log, not the line numbers in the source. The diff shows the line number in the source file, e.g. line 317, and the actual line is 5 lines after that, so line 322, etc.

1 Like

Hello from Germany.
I think there is another error in the kinship report:
Brother-in-law/sister-in-law are only generated by my own sibling’s husband/wife and not my spouse’s brother/sister. If there are no siblings, no brothers-in-law are generated. The same applies to the husband’s/wife’s brother-in-law or sister-in-law, or “Schwippschwager” in German.

1 Like

Thanks for the direction. Although I cloned the built-in report (renamed .py file and the registration ) to be an add-on. So it was

The first time I tried black, I had to install the black package:

black /home/districtsupport/.gramps/gramps52/plugins/KinshipReport2/kinshipreport2.py

bash: black: command not found...
Install package 'black' to provide command 'black'? [N/y] y

Then after installing, `black` did changes with no feedback. So I actually wanted to see the difference, not change the file:
black --diff /home/districtsupport/.gramps/gramps52/plugins/KinshipReport2/kinshipreport2.py
It is still failing the Lint test on GitHub though.

Is the version of Black you’re using locally version 24.1 or better? If not, the formatting rules may be different. GitHub Actions installs and runs version 24.4.2 as can be seen in the log:

Installing black[colorama]==24.4.2...
2 Likes

Hmmm. pip show black reports version 22.8.0

checked with Perplexity AI and it suggested that I update with the following command:
pip install --user --upgrade black==24.4.2

and that was successful.

Testing the --diff with Black 24.4.2 revealed no additional problems. (Yay!)

Pull 1709 still fails the Lint test on GitHub. So I guess that is the next thing to learn.