Easy way to take a Zotero item and format it into a plain-text Harvard style citation
I'm currently writing a translator to export my collections into a specific JSON format for another project. For each collection I'm retrieving the Item objects and manually generating plain-text Harvard style citations by just piecing together the Item's properties.
I feel like I'm re-inventing the wheel and it's quite time-consuming, is there an easy way to achieve this? Say with the Zotero API
I feel like I'm re-inventing the wheel and it's quite time-consuming, is there an easy way to achieve this? Say with the Zotero API
What is the data format you have (if not in Zotero)? What output format do you want? And what does Zotero have to do with it?
To clear things up, I am working on a dataset of archaeological data, the data is in a JSON format and holds an array of objects. Each object represents a site, and each object has a string array containing a bibliography for that site. I wanted to use Zotero in such a way that I could have a collection represent one site, the items within that collection would represent that sites bibliography. What I've been trying to do is write an exporter to take my collections and produce a JSON array which can be used in this aforesaid dataset. That means taking the items within a collection and generating plaintext references which can be inserted into the JSON array of a specific object.
It's a requirement that these be in the Harvard style of referencing (https://www.mendeley.com/guides/harvard-citation-guide).
Thanks
How to do this depends on the fidelity you need. If it's OK that they're sorta-Harvard-usually then it would be easiest in a translator. If you want to make sure all the sometimes-inane citation rules are followed (high-fidelity) I'd personally go with either calling citeproc from within zotero (which means creating a plug-in or a script for the script runner) or talking to the Zotero API (which can export bibliography items if I'm not mistaken).