Skip to content

Commit b1fde2e

Browse files
committed
More examples and new build instructions.
1 parent 571997e commit b1fde2e

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,41 @@
22

33
Smol application that plots lines that are sent to the application stdin.
44

5-
### Compile
5+
## Compile
66

77
```bash
8-
mkdir bin && \
9-
mkdir build && \
10-
make
8+
zig build -Doptimize=ReleaseFast
9+
```
10+
11+
## Install
12+
When built, rlplot is only one file and you can install it using ```install``` command. Here I'm installing it to ```/usr/bin``` directory, but this can be any other directory...
13+
14+
```bash
15+
sudo install zig-out/bin/rlplot /usr/bin/rlplot
16+
```
17+
18+
## Clean
19+
```bash
20+
rm -rdf zig-out;
21+
rm -rdf zig-cache;
22+
```
23+
24+
## Uninstall
25+
```bash
26+
sudo rm /usr/bin/rlplot
1127
```
1228

1329
## Run
1430
rlplot is designed in such a way that it plays nicely with other unix tools. You can just pipe the output of your program to rlplot and rlplot will do it's best to plot your data.
1531

1632
### Examples
33+
34+
#### Plot first 8 Fibonacci numbers from user input
35+
```bash
36+
rlplot
37+
1 1 2 3 5 8 13 21
38+
```
39+
1740
#### Nice Plot
1841
```bash
1942
# Plot numbers from 1 to 69
@@ -80,6 +103,11 @@ while :; do echo $(sensors | grep 'Core' | awk -p '{print substr($3, 1, 4) ";" $
80103
# substr transforms "+52.0C" to "52.0", so one awk will output lines like "52.0;0"
81104
```
82105

106+
#### Plot ram usage.
107+
```bash
108+
while :; do echo $(free | grep Mem | awk -p '{print $3/1024}'); sleep 0.01; done | ./zig-out/bin/rlplot
109+
```
110+
83111
#### Udp client in python
84112

85113
* Write a udb client in python:

0 commit comments

Comments
 (0)