https://forum.world.st/Citizen-example-for-manipulating-a-bibtex-file-tp4784240p4784903.html
from Damien Pollet:
You will need to load the .bib file from zotero (read the file however
you like, then pass the stream to the CZ parser). You'll get a
CZBibSet (I don't recall the name exactly) which represents the
contents of the file. A Set is composed of entries, each of which has
a key and a set of fields. Finally, fields accept a few different
kinds of values.
Your processing is just iterating a set then setting the key of each
entry (or possibly removing and re-adding the entry, I don't recall if
it's implemented like a dictionary or more like a list).