From c85e81cbc7e8d55813a65c4198663c86f566064b Mon Sep 17 00:00:00 2001 From: Bogdan Cochior <bogdan.cochior@thinslices.com> Date: Thu, 9 Aug 2018 13:29:57 +0300 Subject: [PATCH] docs(mts): add readme file --- packages/component-mts-package/readme.md | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/packages/component-mts-package/readme.md b/packages/component-mts-package/readme.md index a1ef9716f..45347c011 100644 --- a/packages/component-mts-package/readme.md +++ b/packages/component-mts-package/readme.md @@ -1,3 +1,7 @@ +## MTS service integration + +This component is running as a service to integrate current Hindawi Manuscript Tracking System for Editorial Quality Screening and for Editorial Quality Assurance. + ### Use-case As an Editor in Chief, I want the manuscript to go through Editorial Quality Screening before I assign a Handling Editor to it and start the review process. @@ -12,5 +16,30 @@ Stage 3: When check is completed, then Faraday system needs to be updated to mov +### Configuration +| Params | Required | Description | +| ------------- |:-------------:| -----| +| journalConfig | Yes | Journal configuration in .xml file as: doctype, dtdVersion, journalTitle, articleType, journal email, journalIdPublisher, issn | +| xmlParserOptions | No | parsing config options used by xml-js library | +| s3Config | Yes | Access to AWS S3 Bucket where fragment files are saved | +| FTPConfig | Yes | FTP server connection credentials | + + +### Usage + +MTS service gathers all the fragment files, creates an .xml file in a specific JATS format out of fragment JSON, creates a .zip archive and sends it to a specific FTP server with a configurable package name (also a backup it's uploaded to AWS S3). + +.xml structure of Hindawi use-case can be checked `/tests/sample.xml` from generated json `/tests/sample.json`. + +#### Example +```javascript +const fragment = {} //fragment json here +const { journalConfig, xmlParser, s3Config, ftpConfig } = config //import your config +const MTS = new MTSService(journalConfig, xmlParser, s3Config, ftpConfig) +MTS.sendPackage({ fragment }) +``` + +[GIFs Demo](https://gitlab.coko.foundation/xpub/xpub-faraday/wikis/mts-integration) + -- GitLab