I haven’t seriously thought about citations and sources before. Not really. Often, I’d just attach a note to an object and be done with it.
But @GeorgeWilmes asked me to add a citation formatter that would turn a Gramps citation and source into a nicely displayed text. So I did that in Gramps Connect.
And then @BlakeIsHereStudios said:
it would be cool if you could copy a citation from another site and create a source and/or citation for you
That would be cool! At first I thought “that’s too hard… let AI do it.” But I have not made any attempt to include AI in Gramps Connect. Would it be possible to do it manually?
And so I set out to try, and here is what I came up with. The new core idea is that a CItation Template describes how to both split text into Citation Elements, and can also turn Citation Elements into text.
Citation Elements are defined in the same way that Gramps Object Queries are described (e.g., using a JSON path on Gramps’ JSON data):
You take those elements and write a template, like:
So,
`Date looked at`
is the name of the element (note the backticks), and that maps to attribute_list['Accessed'].value
Of course for those people that like to input their data manually, you can do that. But if you are like me, you can now create proper citations as easy as cutting and pasting.
If you’d like to read more, check out the blog, or try it out yourself at Gramps Connect demo with username/password editor-1
I posted this in the general Genealogy topic because this idea could be used elsewhere, and I am interested in feedback.

