pt
@sugarcube/plugin-tap
npm i @sugarcube/plugin-tap
pt

@sugarcube/plugin-tap

Monoidal data processes.

by Christo

0.42.1 (see all)License:GPL-3.0TypeScript:Not Found
npm i @sugarcube/plugin-tap
Readme

@sugarcube/plugin-tap

Plugins for SugarCube for side effect only.

Installation

npm install --save @sugarcube/plugin-tap

Plugins

tap_printf

$(npm bin)/sugarcube -c cfg.json -p twitter_feed,tap_printf

Prints the whole envelope (i.e. data and queries) and the full configuration to the screen.

Configuration:

  • tap.select :: Specify the elements to print to the screen. Defaults to data. Valid values are data, queries, stats, cache, plugins and cfg. Specify multiple values by separating values by a comma.

    Example: Print only data and queries to the screen.

    $(npm bin)/sugarcube -p tap_printf --tap.select data,queries

  • tap.limit :: Limit the output to X data units.

    Example: Print only 5 units of data.

    $(npm bin)/sugarcube -c cfg.json -p twitter_feed,tap_printf --tap.limit 5

  • tap.exclude :: Exclude those fields from printing.

    $(npm bin)/sugarcube -c cfg.json -p http_import,tap_printf --tap.exclude body,_sc_body

tap_writef

$(npm bin)/sugarcube -c cfg.json -p twitter_feed,tap_writef

Write the data part of the envelope to a file.

Configuration:

  • tap.limit :: Limit the output to N data units.

    Example: Print only 5 units of data.

    $(npm bin)/sugarcube -c cfg.json -p twitter_feed,tap_writef --tap.limit 5

  • tap.filename :: Specify the name of the output file. Defaults to data-<marker>.json.

  • tap.chunk_size :: Split the data into multiple chunks and write each chunk into it's own file. The file name is based on tap.filename but the chunk id is injected into the filename.

License

GPL3 @ Christo

Downloads/wk

143

GitHub Stars

20

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

15

OPEN PRs

4
VersionTagPublished
0.42.1
latest
1yr ago
No alternatives found
No tutorials found
Add a tutorial

Rate & Review

100
No reviews found
Be the first to rate