sharktail

1.0.15 • Public • Published

sharktail

NPM Version node Dependency Status JavaScript Style Guide

Sharktail lets you pipe output from command-line programs to the web in real-time

Official Node.js client for https://sharktail.herokuapp.com.

Install

Client is available as an npm package.

$ npm install -g sharktail

Usage

Show output on both stdout and sharktail:

$ echo "hello" | sharktail

Dummy loop in batch and pipe to stdout and sharktail client

for /L %n in (1,1,10) do (sleep 1 & echo %n) | sharktail

Dummy loop in bash and pipe to stdout and sharktail client

for i in {1..10}; do echo $i && sleep 1; done | sharktail

Dummy loop in python and pipe to stdout and sharktail client.

  • Please note the usage of -u. Without it, all output will be displayed when the program execution is over instead of real-time. Flushing the stdout after every print statement is required to fix this, but it can be burdensome so using -u is more convenient.
python -u dummy_out.py | sharktail --delay 5

where dummy_out.py is

import time

for i in range(10):
    print("hello {}".format(i))
    time.sleep(1)

-Have time to see URL before full-screen command:

$ echo "hello" | sharktail --delay 5

Author

Yigit Alparslan (@ya332)

Credits & Inspiration

Inspired by seashells.io. This client command is modified heavily from https://github.com/roccomuso/seashells. Credits go to them.

Package Sidebar

Install

npm i sharktail

Weekly Downloads

0

Version

1.0.15

License

MIT

Unpacked Size

5.2 kB

Total Files

5

Last publish

Collaborators

  • ya332