Best practice for creating citations?

This is a regular Tropy item exported to JSON-LD – it’s not the one converted by the plugin. To export the item you need to select the export labeled ‘Zotero’ in the export menu.

Ok !

But nothing happened when I clic on the export labeled “Zotero” (no download, no option, …).

I think you’ve enabled ‘copy to clipboard’ in the plugin configuration. If you disable that option it should prompt you for a file to save to instead.

I have disabled this option.

The .json format no longer appears in my uploaded files but the same message remains in Zotero.

Capture d’écran 2023-04-14 à 10.38.31

Thanks for your help!

Well, again, if you can post the JSON file you’re trying to import we can probably figure out why it’s not importing.

Here, but it is not in JSON anymore :

[
{
“null”: “ARCA JEC I, 1”
}
]

It’s still JSON there’s just not much content. I suspect this is because of the template you’re using. The plugin uses your template to decide how your data should be imported by Zotero. Importantly, you need to at least map a value to the type field and this value must be a valid Zotero item type.

One good way to figure out the mapping you want is to create one sample item in Zotero first. To do this, pick one Tropy item and then create a corresponding item in Zotero, filling out all the values you’d like the export/import process to transfer over. Then export that sample item in Zotero using the CSL/JSON format. If you look at the corresponding file you’ll see all the names/fields that you need to add to your export template.

ok :

My Zotero sample item in CSL JSON :
[
{
“id”: “http://zotero.org/users/2682439/items/B4F5C9VL”,
“type”: “manuscript”,
“archive”: “ARCA JEC I, 1”,
“genre”: “Manuscript”,
“title”: “La J.E.C.F.”,
“author”: [
{
“family”: “Mignolet”,
“given”: “André”
}
],
“issued”: {
“date-parts”: [
[
“1937”
]
]
}
}
]

Then, when I generate the Export in Tropy for that :

There is just :
[
{
“null”: “”
}
]

Right, this is because of your template. In your previous screenshot the template you selected was called “Tropy Generic Zotero”. This template should include a mapping of all the fields you want to export as @flachware explains above.

Judging by the screenshot, the template should include at least the following fields:

  • dc:creator as ‘author’
  • dc:date as ‘issued’
  • dc:title as ‘title’
  • dc:source as ‘archive’
  • dc:type as ‘type’

Note that the labels are all lower case. To make it easier, I’ve created such a template for you as an example:

Tropy Generic To Zotero Manuscript.ttp (1.3 KB)

You can download and import it in the Template preferences. Then you need to configure the plugin to use this template:

Then you can export your item using the plugin. I’ve imported the item you posted earlier and tried this out, as below.

Please note that I also spelled “manuscript” lower case. This gives me the following item:

[
  {
    "title": "La J.E.C.F.",
    "author": [
      {
        "literal": "Mignolet"
      }
    ],
    "issued": {
      "raw": "1937"
    },
    "type": "manuscript",
    "archive": "ARCA JEC I, 1"
  }
]

I can then import this into Zotero:

1 Like

It works!!! Thank you very much for your time and help :slight_smile:

You are helping me a lot with my thesis! Have a nice day

1 Like

Hello,

I attempted what Mariana did without any success. Then I tried again, following all the steps given to camchou001 but still have an error message by Zotero “The selected fil is not a supported format”.
Here are all the steps I followed:

  1. Download the plugin from GitHub (tropy-plugin-csl-v1.1.0.zip)
  2. Install the plugin via the Preference panel
  3. Downloaded your “Tropy Generic To Zotero Manuscript.ttp” template
  4. Duplicated the “Tropy Generic” template and uploaded the upcited template you created
  5. Updated the preferences in the CSL plugin interface (ie: give a name and assign the “Tropy Generic to Zotero Manuscript” template)
  6. Exported the file
  7. Imported it to Zotero…without success

here is the json file I got:
image

then I uploaded your in Zotero (ie: the J.E.C.F one)

and it worked perfectly well…

therefore I think there’s a problem with the traslator or rather the way the plugin is installed in my Tropy.

Can you help me please?

The template maps fields in your item to the respective CSL fields. Therefore, it’s important the template contains the properties which your items use. Based on your JSON output above, only the title was exported which suggests that the other properties (mapped by the template) were empty in your item. You need to update the template to use the properties of your item, then the export will work fine.

We can give you more detailed instructions if you copy and paste one of your items here.

Thank you for your answer. I think the problem lays with the “type” field. as mentionned before, the type field must be filled and correspond to the type of document you use in Zotero. I tried to replicate your settings, artificially trying to implement manuscripts in Zotero using the exemple given in this thread but I tried several alterations and I never end up with the

 "type": "manuscript",

line in the JSON file. (which is, I think, the reason why zotero wouldn’t read any of my several attempts).
Could you detail how you end up with this line in the JSON file (by filling the right fields in the template and item with the right metadata) ?

Thank you

Right, the type field is essential for the Zotero import, because on its basis Zotero decides how to interpret the rest of the data. At the moment you need to add the type to your item in Tropy (you can do this for all items at once via bulk editing).

Here I’ve added Type (dc:type) with the value ‘manuscript’. The ‘Tropy Generic to Zotero Manuscript’ template will then map the dc:type value to the type field in CSL JSON.

It is what I did too, and here is what I end up with:

Capture

:cry:

Almost there!

You must have changed the template used for exporting. I assume it’s still the “Tropy Generic to Zotero Manuscript” but maybe you’ve changed it. In any case, it’s the template that you selected in the plugin configuration – in that template you probably changed the label of the ‘dc:type’ field to “manuscript”. If you change that back to “type” then you should get a working JSON export.

Yay! Sorry I didn’t get the fact that the label “dc:type” should be “type”.
Now I can explain the procedure to the students I train at work!
Thanks for your patience and for your explanations!

1 Like

Hello @inukshuk thank you for developing this plugin and posting the zotero template!
I followed all the steps but Tropy is showing me this error after exporting using the plugin in combination with your “tropy generic to Zotero manuscript” template:

What am I missing? Thanks in advance!

Odd! Do you have a default file set in the plugin configuration? If not, could you try setting one there to see if it makes a difference.

Setting the default file worked! Thank you!!