zotero / translation-server

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

Automatic translator updates #157

Closed abaevbog closed 1 year ago

abaevbog commented 1 year ago

Addresses Issue # 1 Automatic translator updates for /web requests. The logic is:

  1. On load, fetch the metadata. Once it is loaded, check if there are new translators in the metadata that are not present in _cache. Load them up as well if so.
  2. Once the request comes in and all relevant translators are fetched, use updateTranslatorIfNeeded function to check if their lastUpdated date is before the lastUpdated date in the metadata. If so, load the translator's code from the repo, update the _cache.
  3. Returns updated (if applicable) translators to translate the items.
abaevbog commented 1 year ago

Moving this to a PR from a feature branch