Coder Social home page Coder Social logo

viewb's Introduction

viewb

CircleCI

Convert the command to a web server

viewb

Usage

$ viewb  <COMMAND> <ARGS>

Option:
-p=<PORT>: Port(default:8080)
-h: Prints the first N lines.if minus value then prints the last N lines.
-o: Open web browser
-user=<USERNAME>: Basic Authentication user name
-pass=<PASSWORD>: Basic Authentication password
-e=<ENCODING>: input encoding

How to install

Download

or

Build yourself (Go lang).

go install github.com/kurehajime/viewb@latest

Example

Example 1 :Command to web server
$ viewb -p 8080 ls -la

http://localhost:8080
Stop: Ctrl+C

Open in browser http://localhost:8080

total 32  
drwxr-xr-x   6 user  staff   204  8  6 20:19 .  
drwx------+ 11 user  staff   374  8  6 20:17 ..  
-rw-r--r--@  1 user  staff  6148  8  6 20:19 .DS_Store  
-rw-r--r--   1 user  staff     5  8  6 20:18 Untitled-1.txt    
-rw-r--r--   1 user  staff  1557  8  6 20:19 Untitled-2.txt  
drwxr-xr-x   2 user  staff    68  8  6 20:19 test  
Example 2 :Script to web server
$ viewb ./HelloworldAndPingOne.sh

http://localhost:8080
Stop: Ctrl+C

Open in browser http://localhost:8080

Hello World!
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=54 time=60.380 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 60.380/60.380/60.380/0.000 ms
Example 3 :Basic Authentication
$ viewb -user laputa -pass balse echo booomb!

http://localhost:8080
Stop: Ctrl+C

Open in browser http://localhost:8080
And login.

Example 5 :open browser
$ viewb -o echo yah!

http://localhost:8080
Stop: Ctrl+C

Open automatically.

viewb's People

Contributors

kurehajime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lanastasov

viewb's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.