Zotero API New Template to CSL

Hello!

When using the api to retrieve templates for items, what is the best way to map or translate that template to CSL? Such that a processor like citeproc-js could process it.

For example how to convert the retrieved book template to CSL...
GET /items/new?itemType=book

Thanks!
  • edited June 27, 2018
    (Better to post API questions to zotero-dev. We try to keep technical discussions there.)

    I don't totally understand what you're trying to do.

    That API call is for creating a Zotero item. If you want to export a Zotero item as CSL-JSON, you can do so with ?format=csljson after creating the item.
  • ah okay thanks, Ill start posting over there.

    I believe I found a good option. https://www.npmjs.com/package/zotero-to-csl

    Ill try it out!
  • I'm still not clear on what the point of that would be. Why would you need to convert an empty Zotero item template into CSL-JSON rather than 1) converting an actual Zotero item to CSL-JSON with format=csljson or 2) just creating a CSL-JSON item directly?
Sign In or Register to comment.