Zotero integration follow-up request

I saw an old request from Oct. 2017 for Zotero integration, and wanted to follow up on that. I’d love to be able to easily import tropy metadata into my Zotero library. I use both Tropy and Zotero to annotate, transcribe, and organize. So I find that I cut and paste what I type in Tropy into a Zotero bibliographic entry to make sure my research records are complete, and also because the Zotero interface fits more with how I “see” my research as a complete entity.

Is there a way to facilitate the cut and paste action with an automatic “add citation to Zotero” button or some such thing? Or, what about the reverse, “add metadata to Tropy”?

Thanks for considering this. I think the two programs play so well together and would like to increase my use of Tropy, but right now it feels quite amorphous compared to my neat and organized Zotero library.

3 Likes

We have a plugin to export items to Zotero which kind of stalled for lack of more usage examples. Basically, the open question is field mappings. In Tropy you can use properties of any vocabulary so we could create a vocabulary of all properties used by Zotero or, preferably, map certain fields to corresponding fields in Zotero. The plugin will use the latter approach and allow you to customize the mapping via Tropy templates, however, we’re still looking for a good default mapping that will work as expected for most.

If you could share a few Tropy items with us here and explain how you would like the result in Zotero to look like, that would be much appreciated!

I can share dummy example of archival field mappings. Ability to export to Zotero is very important while working with archival materials. Is this plugin somewhere located where users can experiment with it?

Zotero has quite serious drawback with archives – it has very few fields for archival material. It is only three archival fields: archive, archive_location, call-number. Lithuanian archival system needs five fields (as in other post-soviet republics, I think): name of archive, collection, box (not always), file (like folder) and sometimes volume of the file.

So I think, that there is very little chance to create default mapping that will work for the most users. Because all users of Zotero are inventing their own mappings. Best would be let for the users customize mappings themselves.

I didn’t find the way of inserting volume of the file, so for now I am using Biblatex for that (tex.volume= 2 in note field is used by converter to biblatex – Zotero addon Better Biblatex).
So archive name is in Zotero archive field, collection – in archive location, box – source, file/folder – call-number. I placed volume number in identifier field in Tropy.
Why such order – because it is sort of natural, it is used in citations (and in Tropy too). And in Zotero gui these fields lie in such order. Maybe that can be most natural thing – map archival fields as they lay in Tropy and Zotero. And user can change that.

Tropy json:
    {
  "@context": {
    "@version": 1.1,
    "@vocab": "https://tropy.org/v1/tropy#",
    "template": {
      "@type": "@id"
    },
    "photo": {
      "@id": "https://tropy.org/v1/tropy#photo",
      "@container": "@list",
      "@context": {
        "note": {
          "@id": "https://tropy.org/v1/tropy#note",
          "@container": "@list"
        },
        "selection": {
          "@id": "https://tropy.org/v1/tropy#selection",
          "@container": "@list",
          "@context": {
            "note": {
              "@id": "https://tropy.org/v1/tropy#note",
              "@container": "@list"
            }
          }
        }
      }
    },
    "source": "http://purl.org/dc/elements/1.1/source",
    "title": "http://purl.org/dc/elements/1.1/title",
    "creator": "http://purl.org/dc/elements/1.1/creator",
    "date": {
      "@id": "http://purl.org/dc/elements/1.1/date",
      "@type": "https://tropy.org/v1/tropy#date"
    },
    "type": "http://purl.org/dc/elements/1.1/type",
    "identifier": "http://purl.org/dc/elements/1.1/identifier"
  },
  "@graph": [
    {
      "@type": "Item",
      "template": "https://tropy.org/v1/templates/generic",
      "source": "Archive name",
      "title": "Title: Subtitle",
      "box": "1",
      "collection": "K-30",
      "folder": "171",
      "creator": "Surname, Name",
      "date": "1999-09-19",
      "type": "letter",
      "identifier": "2",
      "list": [
        "171 Uniaty"
      ],
      "photo": [
        {
          "@type": "Photo",
          "checksum": "1a640a437190520569dfe12673a8fabf",
          "color": "rgb(143,125,99,1)",
          "density": null,
          "mimetype": "image/jpeg",
          "orientation": 1,
          "page": 0,
          "path": "/path/to/file/DSCF8271.JPG",
          "protocol": "file",
          "size": 110168,
          "template": "https://tropy.org/v1/templates/photo",
          "angle": 0,
          "brightness": 0,
          "contrast": 0,
          "height": 640,
          "hue": 0,
          "mirror": false,
          "negative": false,
          "saturation": 0,
          "sharpen": 0,
          "width": 480,
          "date": "2007-12-17T12:50:47.000Z",
          "title": "DSCF8271"
        }
      ]
    }
  ],
  "version": "1.8.0"
}

Zotero json:

 {
 	"id": "surname1999titlesubtitle",
 	"type": "manuscript",
 	"multi": {
 		"main": {},
 		"_keys": {}
 	},
 	"archive": "Archive name",
 	"archive_location": "K-30",
 	"call-number": "171",
 	"genre": "letter",
 	"language": "lt",
 	"note": "tex.volume= 2",
 	"number-of-pages": "11-22",
 	"source": "1",
 	"title": "Title: Subtitle",
 	"URL": "https://aurimasv.github.io/z2csl/typeMap.xml#toc",
 	"author": [
 		{
 			"family": "Surname",
 			"given": "Name",
 			"multi": {
 				"_key": {}
 			}
 		}
 	],
 	"accessed": {
 		"date-parts": [
 			[
 				"2020",
 				9,
 				28
 			]
 		]
 	},
 	"issued": {
 		"date-parts": [
 			[
 				"1999",
 				9,
 				19
 			]
 		]
 	}
 }
]

And tags and notes should be imported to Zotero too (notes not as note field, but as textual notes – one note from Tropy – one note in Zotero, Zotero can handle many notes to one citation).

Thanks @maras!

The plugin is already up on GitHub but nothing is documented yet (and it’s going to change a lot still). Basically, our plan is to utilize templates to allow custom mappings. Here you can see our starting template with the idea that you can also create your own templates and configure the plugin to use it. When exporting your metadata the plugin would go through each field and if the respective property is defined in your template it will export the data to the CSL file using the label in the template as the key in the output. This way you can map dc:creator to the author field for example.

Hacks like using tex.volume=2 as a value would continue to work this way, but obviously it would be much nicer to use a proper field in Tropy and then generate the output like that. This should not be very hard to do in the plugin, although probably not in a way that is easily customizable. In any case, it should be easy to modify the plugin to generate the output according to your requirements.

Thank you for the answer.
So this plugin not installable yet. I’m eagerly waiting for beta release :).

This hack I’m using in Zotero, not in Tropy – Tropy has proper field.
The only field that I need for archival sources in default Tropy Generic is pages.

1 Like