Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kurehajime/viewb
convert the command to a web server
https://github.com/kurehajime/viewb
console-tool go golang viewb webservers
Last synced: 4 days ago
JSON representation
convert the command to a web server
- Host: GitHub
- URL: https://github.com/kurehajime/viewb
- Owner: kurehajime
- License: mit
- Created: 2015-08-06T11:06:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-29T14:26:15.000Z (about 3 years ago)
- Last Synced: 2024-06-19T06:46:24.601Z (5 months ago)
- Topics: console-tool, go, golang, viewb, webservers
- Language: Go
- Homepage:
- Size: 10.1 MB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# viewb
[![CircleCI](https://circleci.com/gh/kurehajime/viewb.svg?style=svg)](https://circleci.com/gh/kurehajime/viewb)
Convert the command to a web server
![viewb](https://cloud.githubusercontent.com/assets/4569916/9249386/589c2126-41ff-11e5-9e6f-b12daa6aadf0.png)
## Usage
```
$ viewb
```Option:
-p=\: Port(default:8080)
-h: Prints the first N lines.if minus value then prints the last N lines.
-o: Open web browser
-user=\: Basic Authentication user name
-pass=\: Basic Authentication password
-e=\: input encoding## How to install
[Download](https://github.com/kurehajime/viewb/releases)
or
Build yourself (Go lang).
```
go install github.com/kurehajime/viewb@latest
```## Example
##### Example 1 :Command to web server
```sh
$ viewb -p 8080 ls -lahttp://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
```sh
$ viewb ./HelloworldAndPingOne.shhttp://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
```sh
$ 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
```sh
$ viewb -o echo yah!http://localhost:8080
Stop: Ctrl+C
```Open automatically.