• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

zotero/web-library

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

zotero/web-library

开源软件地址(OpenSource Url):

https://github.com/zotero/web-library

开源编程语言(OpenSource Language):

JavaScript 79.1%

开源软件介绍(OpenSource Introduction):

Web Library

This is zotero.org's Web Library capable of being installed/run on other websites.

Web Library is a single-page application implemented in Javascript. It uses Zotero API via CORS requests and requires keys configured in order to access private libraries.

Installation

  1. Clone git repository into target web directory (git clone https://github.com/zotero/web-library.git)
  2. Ensure up-to-date version of Node is used. On systems where nvm is available it's possible to use nvm use to switch to a preferred version of node.
  3. Run npm install to install dependencies
  4. Tweak configuration in src/html/index.html and/or src/html/embedded.html. Default configuration displays a public library in read-only mode. In order to edit a library, change userId and provide apiKey.
  5. Run development proces: npm start
  6. Point browser at http://localhost:8001/ to see the demo
  7. Modyfing source files will trigger incremental build

Production-ready version can be built with npm run build and served with npm run serve.

Configuration

Web Library reads configuration from a DOM node with ID zotero-web-library-config. See example config in src/html/index.html. To access private libraries, userId and apiKey must be provided. It's also possible to configure Web Library to only display public libraries, in which case libraries object must be populated and it must include value for defaultLibraryKey as well as includeMyLibrary set to false.

Build targets

There are two build targets controlled by TARGET environment variable: zotero and embedded. Former produces a single-page app as seen on zotero.org, latter produces a web-library widget that can be embedded on other pages. Embedded build is currently considered experimental. It's also possible to build both variants using TARGET set to all (default behaviour).

Build & Development options

The following environment variables are recognized:

  • DEBUG - if set to 1 extra info about produced bundle will be printed to the console. Increases build time.
  • EMBEDDED - if set to 1 dev server will default to src/html/embedded.html, otherwise it will serve src/html/index.html.
  • LOCALE_CACHE_TIME - advanced usage, see scripts/fetch-locale.cjs.
  • NODE_ENV - used by build scripts to control various debug options. See package.json.
  • PORT - port on which development server listens for incoming connections.
  • STYLES_CACHE_TIME - advanced usage, see scripts/build-styles-json.cjs.
  • TARGET - see Build targets above.
  • TRANSLATE_URL - URL where to proxy translation requests.
  • USE_HTTPS - if set to 1 dev server will use HTTPS. Requires certificates, see scripts/server.cjs.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
srendle/libfm: Library for factorization machines发布时间:2022-08-15
下一篇:
mockk/mockk: mocking library for Kotlin发布时间:2022-08-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap