Skip to content

Command line utility to pipe one input encoding to another encoding

Notifications You must be signed in to change notification settings

saibotsivad/pipe-transform-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipe-transform-cli Build Status

Command line utility to pipe one input encoding to another encoding

install

This utility requires nodejs to be installed.

Then, install the normal way with:

npm install -g pipe-transform-cli

use it

Run it from the command line:

pipetransform [input encoding] [output encoding]

supported encodings

Supported input and output encodings are:

  • binary
  • utf8
  • hex
  • base64
  • base64url

examples

For example, pipe the openssl hashing output to turn it to base64url:

openssl dgst -sha256 -binary text.txt | pipetransform binary base64url

trailing newline trim

If the input encoding is utf8, base64, base64url, or hex, the final trailing newline will be stripped.

With the trailing newline stripped the output is:

echo words | pipetransform --trim utf8 hex # => 776f726473

While without the trim, the output would have been different:

echo words | bad-pipetransform --trim utf8 hex # => 776f7264730a

license

VOL

About

Command line utility to pipe one input encoding to another encoding

Resources

Stars

Watchers

Forks

Packages

No packages published