Giter Site home page Giter Site logo

translate's Introduction

Zotero Translate

This repository contains the Zotero translation architecture code responsible for parsing Zotero translators and running them on live and static web pages to retrieve Zotero items.

A consumer of this repository needs to implement the following interfaces:

  • Zotero.Translators found in translators.js
  • Zotero.HTTP found in http.js
  • Zotero.Translate.ItemSaver found in translation/translate_item.js

You also need to:

  • Call Zotero.Schema.init(data) with Zotero schema.json.
  • If running in a ModuleJS environment (e.g. Node.js) call require('./cachedTypes').setTypeSchema(typeSchema) with the result of resource/zoteroTypeSchemaData.js.

Please bundle translators and Zotero schema with the translation architecture. Do not load them from a remote server.

You may also want to reimplement or modify:

  • Zotero.Repo found in repo.js to set up periodic translator update retrieval
  • Zotero.Debug found in debug.js to customize debug logging
  • Zotero and Zotero.Prefs found in zotero.js to set up the environment and long-term preference storage
  • Zotero.Translate.ItemGetter found in translation/translate_item.js for export translation
  • Zotero.Translate.SandboxManager found in translation/sandboxManager.js for a tighter Sandbox environment if available on your the platform

Example

See example/index.html for file loading order.

To run the example:

$ git submodule update --init
$ google-chrome --disable-web-security --user-data-dir=/tmp/chromeTemvar

Open example/index.html in the CORS ignoring Google Chrome

translate's People

Contributors

adomasven avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.