Script to find closest common ancestor
Quote from Sid Cooperrider on 2026-03-19, 6:25 pmAlso finds relationship. Prints birth year if found. Can be used on more than two people if you want. The --show-path option at the end prints out the people in the chain.
Use:
python common_ancestor.py <RM filename> <RM ID#1> <RM ID#2>
Example:
python common_ancestor.py GENDB.rmtree 210087 210084
==================================================
Ruprecht von Veldenz (1506) 4 gens from ancestor
Maria Ursula von Salm-Kyrburg (1515) 5 gens from ancestor
Common ancestor: Elisabeth von Nüremburg (1358)
Relationship: 3rd cousins, once removedExample with --show-path:
python common_ancestor.py GENDB.rmtree 210087 210084 --show-path
==================================================
Ruprecht von Veldenz (1506) 4 gens from ancestor
Maria Ursula von Salm-Kyrburg (1515) 5 gens from ancestor
Common ancestor: Elisabeth von Nüremburg (1358)
Relationship: 3rd cousins, once removedPath from A:
> Ruprecht von Veldenz (1506)
> Alexander von Pfalz-Zweibrücken Wittelsbach (1462)
> Ludwig I von Pfalz-Zweibrücken (1424)
> Stefan von Simmern-Zweibrücken (1385)
> Elisabeth von Nüremburg (1358)Path from B:
> Maria Ursula von Salm-Kyrburg (1515)
> Anna Von Isenburg-Kelsterbach (1501)
> Amalie, Countess von Looz und Rieneck (1478)
> Amalie von Mosbach (1433)
> Otto Count Palatine of Mosbach Wittelsbach (1390)
> Elisabeth von Nüremburg (1358)
Also finds relationship. Prints birth year if found. Can be used on more than two people if you want. The --show-path option at the end prints out the people in the chain.
Use:
python common_ancestor.py <RM filename> <RM ID#1> <RM ID#2>
Example:
python common_ancestor.py GENDB.rmtree 210087 210084
==================================================
Ruprecht von Veldenz (1506) 4 gens from ancestor
Maria Ursula von Salm-Kyrburg (1515) 5 gens from ancestor
Common ancestor: Elisabeth von Nüremburg (1358)
Relationship: 3rd cousins, once removed
Example with --show-path:
python common_ancestor.py GENDB.rmtree 210087 210084 --show-path
==================================================
Ruprecht von Veldenz (1506) 4 gens from ancestor
Maria Ursula von Salm-Kyrburg (1515) 5 gens from ancestor
Common ancestor: Elisabeth von Nüremburg (1358)
Relationship: 3rd cousins, once removed
Path from A:
> Ruprecht von Veldenz (1506)
> Alexander von Pfalz-Zweibrücken Wittelsbach (1462)
> Ludwig I von Pfalz-Zweibrücken (1424)
> Stefan von Simmern-Zweibrücken (1385)
> Elisabeth von Nüremburg (1358)
Path from B:
> Maria Ursula von Salm-Kyrburg (1515)
> Anna Von Isenburg-Kelsterbach (1501)
> Amalie, Countess von Looz und Rieneck (1478)
> Amalie von Mosbach (1433)
> Otto Count Palatine of Mosbach Wittelsbach (1390)
> Elisabeth von Nüremburg (1358)