zotero / translation-server

A Node.js-based server to run Zotero translators
Other
117 stars 49 forks source link

Question: How is the key hash generated? #150

Closed v217 closed 1 year ago

v217 commented 1 year ago

I use the wikipedia getCitation api which is based on translation-server, my question is: How is the key: value in the following example KG7GUFFB generated? Thanks!

abstractNote: 'I use the wikipedia getCitation api which is based on translation-server,
  my question is: How is the key: value in the following example KG7GUFFB generated?
  Thanks!'
accessDate: '2022-12-09'
creators: []
itemType: webpage
key: KG7GUFFB
language: en
shortTitle: Question
tags: []
title: "Question: How is the key hash generated? \xB7 Issue #150 \xB7 zotero/translation-server"
url: https://github.com/zotero/translation-server/issues/150
version: 0
websiteTitle: GitHub

(I transformed the json-response to yaml for readability.)

dstillman commented 1 year ago

https://github.com/zotero/utilities/blob/3143d5518d0044152bdca2b11e5ba2de92b5101f/utilities.js#L1616-L1623

But there's no particular guarantee it will stay that way. The key is used for object identification in the Zotero ecosystem — it's not intended for any other purpose.

v217 commented 1 year ago

Thanks!