# pipeline-handler

> an idependant handler for pipelines (like in perfidy or epitelete)

Latest version **2.2.2** (published 2022-12-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install pipeline-handler
pnpm add pipeline-handler
yarn add pipeline-handler
bun add pipeline-handler
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.2 |
| Published | 2022-12-05 |
| First published | 2022-09-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 54.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nicolas Condomitti |
| Maintainers | danielc-n |
| Keywords | pipeline, proskomma, epitelete, perfidy, usfm, perf |

## Links

- npm: https://www.npmjs.com/package/pipeline-handler
- Repository: https://github.com/Proskomma/proskomma-pipelines
- Homepage: https://github.com/Proskomma/proskomma-pipelines#readme
- Issues: https://github.com/Proskomma/proskomma-pipelines/issues
- npm.io page: https://npm.io/package/pipeline-handler

## Dependencies (3)

- [xregexp](https://npm.io/package/xregexp.md) ^5.1.1
- [deep-copy-all](https://npm.io/package/deep-copy-all.md) ^1.3.4
- [proskomma-json-tools](https://npm.io/package/proskomma-json-tools.md) ^0.5.12

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.2.2 (latest) — 2022-12-05
- 2.2.1 — 2022-12-01
- 2.2.0 — 2022-11-20
- 2.1.1 — 2022-11-19
- 2.1.0 — 2022-11-19
- 2.0.4 — 2022-11-19
- 2.0.3 — 2022-11-19
- 2.0.2 — 2022-11-18
- 2.0.1 — 2022-11-18
- 2.0.0 — 2022-11-18
- 1.1.1 — 2022-10-17
- 1.1.0 — 2022-09-30
- 1.0.1 — 2022-09-27
- 1.0.0 — 2022-09-27

## README

# pipelineHandler

## Getting started

```
$ npm i pipeline-handler
```

**You can find working examples under `test` folder**

API of the `pipelineHandler` class :  
* pipelines : your custom pipelines
* transforms : your custom transforms to use
* proskomma : a proskomma instance (if needed)
* verbose : `true|false`

## Using official pipelines

This package contains many pipelines already. You can use them as shown in the examples.

### List of official pipelines

* `stripAlignmentPipeline` : 
  * description : strip alignment from a perf document
  * imputs :
    * `perf` : your aligned perf document
* `mergeAlignmentPipeline` :
  * description : merge alignment of a perf document
  * imputs :
    * `perf` : your previously stripped perf document
    * `strippedAlignment` : the report of `stripAlignmentPipeline`
* `perf2usfmPipeline` :
  * description : PERF => USFM
  * imputs :
    * `perf` : your perf document
* `usfm2perfPipeline` :
  * description : USFM => PERF
  * imputs :
    * `usfm` : your usfm document
    * `selectors` : the selectors (eg: `{"lang": "fra","abbr": "fraLSG"}` )

```js
const PipelineHandler = require("pipeline-handler");
const { Proskomma } = require("proskomma");

const pipelineH = new PipelineHandler({proskomma : new Proskomma()});

async function test() {
    let output = await pipelineH.runPipeline("YOUR_PIPELINE_NAME", {
        ...YOUR_INPUTS
    });
    
    // do some stuff with the output ...
}

test();

```

## Development
```
$ npm i
$ npm run build
$ npm run test
```

This will create a perf file `output.json`.

## example

See the [`test/test_usfm2perf_pipeline.js`](test/test_usfm2perf_pipeline.js) file for an example of a running code.

---
_Source: https://npm.io/package/pipeline-handler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
