@sugarcube/plugin-tap
v0.42.1
Published
K-combinators for sugarcube.
Downloads
50
Maintainers
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 todata
. Valid values aredata
,queries
,stats
,cache
,plugins
andcfg
. 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 todata-<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 ontap.filename
but the chunk id is injected into the filename.