/texture

Front-end tools for digital content production

Primary LanguageJavaScriptMIT LicenseMIT

Texture

Texture is a toolset for the production of scientific content. It has first-class support for JATS, the de facto standard for archiving and interchange of scientific open-access contents with XML. Texture User Interface

Install

Clone the repository.

$ git clone https://github.com/substance/texture.git

Navigate to the source directory.

$ cd texture

At the moment, the default branch provides the develop version. To get the latest stable version switch to the master branch:

$ git checkout master

Install via npm

$ npm install

Start the dev server

$ npm run start

And navigate to http://localhost:5555

To run the tests in the browser navigate to http://localhost:5555/test

To run the test suite headless:

$ npm test

Usage

Here's how you can integrate Texture into your web app.

// app.js
import { Texture, TextureConfigurator, AuthorPackage } from 'substance-texture'
import MyXMLStore from './MyXMLStore'

let configurator = new TextureConfigurator()
configurator
  .import(AuthorPackage)
  .setXMLStore(MyXMLStore)

window.onload = function() {
  window.app = Texture.mount({
    documentId: 'doc-1',
    configurator: configurator
  }, document.body)
}

Texture is fully configurable. So you need to supply a custom configuration by importing packages.

In order to connect Texture to a backend you need to define an XML Store:

// MyXMLStore.js
import { request } from 'substance'

export default class MyXMLStore {
  readXML(documentId, cb) {
    request('GET', 'https://myserver.com/documents/'+documentId+'.xml', null, cb)
  }

  writeXML(documentId, xml, cb) {
    var data = { content: xml }
    var url = 'https://myserver.com/documents/'+documentId+'.xml'
    request('PUT', url, data, cb)
  }
}

Bundle examples

$ npm run bundle

Contribute

See CONTRIBUTING.md.

Roadmap

See Texture website.

License

Texture is open source, and you are legally free to use it commercially. If you are using Texture to make profit, we expect that you help fund its development and maintenance.

Credits

Texture is developed by the Substance Consortium formed by the Public Knowledge Project (PKP), the Collaborative Knowledge Foundation (CoKo), SciELO and Érudit.

The following people make Texture possible:

  • Alex Garnett (leadership, concept)
  • Juan Pablo Alperin (leadership, concept)
  • Alex Smecher (concept, dev)
  • Kristen Ratan (leadership)
  • Adam Hyde (leadership)
  • Jure Triglav (concept, dev)
  • Tanja Niemann (leadership)
  • Davin Baragiotta (concept, dev)
  • David Cormier (dev)
  • Sophy Ouch (design)
  • Fabio Batalha Cunha dos Santos (leadership, concept)
  • Michael Aufreiter (dev)
  • Oliver Buchtala (dev)