Greatgramps: A static site generator for GRAMPS family trees

benn_881 pts0 comments

Ben Nuttall — greatgramps: a static site generator for GRAMPS family trees

Published 27 June 2026

greatgramps: a static site generator for GRAMPS family trees

Last year I came across a few paper family trees from different sections of my family my Gran had<br>collected, and I decided to look for a way to digitise them and bring them all together. Firstly I<br>scanned them all in to make digital copies, and then I looked to see if Ubuntu had any family tree<br>software. I found GRAMPS, the brilliantly backronymed<br>Genealogical Research and Analysis Management Programming System.

GRAMPS

I spent some time entering all the names and dates into GRAMPS, combining the data from five<br>different trees. I quickly got the hang of GRAMPS, and found it quite a useful tool for visualising<br>and navigating the tree. I proceeded to ask my parents for more info on family members, filling in<br>gaps and adding detail. I then went into the family history helpdesk at Manchester Central<br>Library to learn about how to conduct research and go further back than<br>the paper trees did. I got some guidance and continued my research at home using<br>FreeBMD, FamilySearch and later,<br>Ancestry.

I found Ancestry useful for finding actual records, but I found myself having to maintain a separate<br>tree online as well as my GRAMPS tree on my computer, in order for Ancestry to be useful. Ancestry<br>also requires a subscription to access records, and it's not a lot of use without one. It's well<br>worth paying for a subscription on a month-by-month basis while you have the time and inclination to<br>do some research, but if Ancestry was the only place you could access the data, that's no use<br>either. Ancestry being on the web means you can share it with others, but even if you have a<br>subscription, your family can't see the records you've collected without their own subscription.

Ancestry does let you download the images of records you've found, such as birth, baptism, marriage,<br>death and burial records, and Census returns. I made an effort to download any records relating to<br>direct ancestors, and keep them organised, but I didn't originally bother to associate them with<br>events in GRAMPS because it didn't seem worth the effort.

Recently, I wondered how easy it would be to access the data in my GRAMPS database with Python, and<br>potentially make a static site from the data. I guided Claude in the experiment<br>and as usual, made quick progress and it soon became obvious I would be able to build something<br>useful. I aimed to build a static site generator so I could host a browsable tree I could share with<br>family. This was not just possible but easy because GRAMPS itself is written in Python, and has a<br>Python library for accessing data from a database, so there was no reverse-engineering or guesswork.

I created a homepage with an overview of the family tree, individual pages for each person in the<br>tree, then added lists of ancestors and descendants, tree views, maps of event locations, and<br>quickly got something I could click around and explore. I found with it being a generated static<br>site, clicking around is lightning fast — there's nothing to compute and nothing to wait for.

While building out the features I wanted, step-by-step with Claude, I tried creating events for a<br>few Census returns and attached the images I got from Ancestry. It allowed me to view them within a<br>person's life events in a way I thought would be worth adding, so I began to do this for as many<br>ancestors as possible. In doing so I ended up scripting automations for common tasks, which<br>alleviated the workload I'd have had doing this in the GRAMPS UI. I had a command to create a Census<br>event with an image, one to list someone's children, and one to add people in bulk to an event,<br>which would give me a preview to indicate the ages at the time so I could verify from the Ancestry<br>record and the image itself. I did this for a few different tasks and turned it into a CLI.

I kept adding features to the interface, and I'm pleased with what I've ended up with — I have a<br>private self-hosted site I can share with my family, and it's inspired me to add more detail to the<br>tree because I can see images and maps alongside the data. Hopefully it will be useful to other<br>people, and maybe even inspire people to create their own family tree in GRAMPS.

I also put together a demo tree generator, so I could build a website for a fake tree showcasing the<br>features.

As well as the CLI for reading from and managing data in GRAMPS, I also added a PDF tree generator<br>so I can generate ancestor,<br>descendant and<br>hourglass charts as printable PDFs.

I've released this as a library called greatgramps :

PyPI

GitHub

Documentation

Demo

The library is in three parts, which require different dependencies:

The CLI — the grgr command-line tool

Static site builder — commands for generating the static site

PDF generator — the grgr pdf commands for generating PDF trees

See the docs for more info.

I have traced 195 ancestors and...

gramps family tree site ancestry static

Related Articles