
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A command line tool,like C-preprocessor/sed/awk/perl.for embedding version/date/any data to template text/source.
Like #ifdef, you can enable/disable parts of template text/source by command line.
Additionally, applying unix filter to parts of input stream. you can write markdown / pug inside your source code.
$ cat example.js
console.log("version is @PARTPIPE@VERSION@PARTPIPE@");
$ partpipe VERSION=1.2.0 -O destDir/ -- example.js
$ cat destDir/example.js
console.log('version is 1.2.0');
$ cat LICENSE
Copyright 2017-@PARTPIPE@!date +Y@PARTPIPE@ Your Name
$ partpipe -O destDir/ -- LICENSE
$ cat destDir/LICENSE
Copyright 2017-2019 Your Name
$ cat expample.js
@PARTPIPE@RELEASE
console.log('relase build')
@PARTPIPE@
@PARTPIPE@DEBUG
console.log('debug build')
@PARTPIPE@
$ partpipe RELEASE= DEBUG -O destDir/ -- example.js
$ cat expmple.js
console.log('debug build)'
$ cat example.js
var html=`
@PARTPIPE@|md2html
# Hello World
This is a greeting application.
@PARTPIPE@
`;
$ partpipe -O destDir/ -- example.js
$ cat destDir/example.js
var html=`
<H1>Hello World</H1>
<p>This is a greeting application.</p>
`;
sudo npm install -g partpipe
partpipe [<options>] [<TAG>[=<replacetext>]]... -O <outputdir> [-- files1 files2 ...]
version -
Copyright(c) 2017-2019,@kssfilo(https://kanasys.com/gtech/)
A command line tool,like C-preprocessor/sed/awk/perl.for embedding version/date/any data to template text/source.
Like #ifdef, you can enable/disable parts of template text/source by command line.
Additionally, applying unix filter to parts of input stream. you can write markdown / pug inside your source code.
- h show this usage
- d debug mode
- o <filename> destination file name(default:stdout). use -O in multi-file mode
- O <dirname> destination dir.file name will be same as input filename or partipe.out.
- i <filename> input file name(default:stdin).
- c clear contents of unknown tag(default:passthrough)
- s show contents of unknown tag(default:passthrough)
- w error on unknown tag(default:paththrough)
- f <string> use <string> as block separator(default:@PARTPIPE@)
- I don't process indents
- C old mode(ver 0.x.x compatible)
you can specify multi-file like this '-i file1 -i file2 ..' or '-- file1 file2 *.txt ..'
<TAG>=<replacetext> replaces @PARTPIPE@<TAG>@PARTPIPE@ with <replacetext>. e.g. 'VERSION=1.2.0' replaces '@PARTPIPE@VERSION@PARTPIPE@'
<TAG> shows <block> of @PARTPIPE@<TAG>;<block>@PARTPIPE@ e.g. 'DEBUG' replaces '@PARTPIPE@DEBUG;console.log("debug mode")@PARTPIPE@' to 'console.log("debug mode")'
<TAG>= removes <block> of @PARTPIPE@<TAG>;<block>@PARTPIPE@ e.g. 'DEBUG=' replaces '@PARTPIPE@DEBUG;console.log("debug mode")@PARTPIPE@' to ''
<TAG>@<command> apply <command> to <block> of @PARTPIPE@TAG;<block>@PARTPIPE@ e.g. "MD@md2html" applys '@PARTPIPE@MD;# title@PARTPIPE@' to '<h1>titile</h1>'
# you can omit <block>. like '@PARTPIPE@DATE@PARTPIPE' in template text and 'DATE@date +%m%d%Y'. in command like. result will be '17/07/2019'
$ cat example.js
console.log("version is @PARTPIPE@VERSION@PARTPIPE@");
$ partpipe VERSION=1.2.0 -O destDir/ -- example.js
$ cat destDir/example.js
console.log('version is 1.2.0');
$ cat example.js
@PARTPIPE@RELEASE;console.log('release build');@PARTPIPE@
@PARTPIPE@DEBUG;console.log('debug build');@PARTPIPE@
$ partpipe RELEASE DEBUG= -O destDir/ -- example.js
$ cat destDir/example.js
console.log('release build');
$ partpipe RELEASE= DEBUG -O destDir/ -- example.js
$ cat destDir/example.js
console.log('debug build');
$ cat expample.js
@PARTPIPE@RELEASE
console.log('release build')
@PARTPIPE@
@PARTPIPE@DEBUG
console.log('debug build')
@PARTPIPE@
$ partpipe RELEASE= DEBUG -O destDir/ -- example.js
console.log('debug build');
$ cat LICENSE
Copyright 2017-@PARTPIPE@!date +Y@PARTPIPE@ Your Name
$ partpipe -O destDir/ -- LICENSE
$ cat destDir/LICENSE
Copyright 2017-2019 Your Name
if tag is start by '!', partpipe treats it as command line. you can embed date or web data(by curl/norl) or everything
$ cat example.js
var html=`
@PARTPIPE@|md2html
# Hello World
This is a greeting application.
@PARTPIPE@
`;
$ partpipe -O destDir/ -- example.js
$ cat destDir/example.js
var html=`
<H1>Hello World</H1>
<p>This is a greeting application.</p>
`;
if tag is start by '|', partpipe also treats it as command line. then inject the block to this stdin.
you can write markdown or pug in your program code. off course, any unix filter can be used such as sort / uniq.
$ cat example.js
var html=`
@PARTPIPE@MARKDOWN
# Hello World
This is a greeting application.
@PARTPIPE@
`;
$ partpipe 'MARKDOWN@md2html' -O destDir -- example.js
$ cat example.js
var html=`
<H1>Hello World</H1>
<p>This is a greeting application.</p>
`;
you can specify filter by command line. embed like normal tag. then add '@' in partpipe command line.
var partpipe=require("partpipe");
var input=`Colors:
@PARTPIPE@|sort|uniq
Red
Blue
Green
Blue
Red
@PARTPIPE@`;
partpipe(input).then((result)=>console.log(result));
FAQs
Command line filter to apply unix filter to parts of input stream.
We found that partpipe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.