๐Ÿ“ฆ DeflateAwning / color_stream

๐Ÿ“„ README.md ยท 36 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36# color_stream
A quick Python script to run another shell command, and split/color the
stdout/stderr streams green/red

## Story

While working with redirecting and assessing the output from another CLI tool,
I needed a way to see what was going to stderr, and what was going to stdout.

This tool highlights the two streams, in real time.

## Usage

```bash
pip install color_stream

color_stream '<another command here>'
## OR ##
python3 -m color_stream '<another command here>'

# Test it with the demo script in this repo:
color_stream python demo_1.py

# Test it with "ls" (success, and error with file that doesn't exist):
color_stream ls file_that_exists.txt file_that_does_not_exist.txt

# Print out the total bytes count statistics:
color_stream --stat python demo_1.py
```

## Limitations

- [ ] reading from stdin is untested, and likely doesn't work
- [ ] throughput speed is currently not benchmarked
- [ ] switching colors is not currently supported