git ssb

1+

cel / pngspark



Commit edccdfe157b8cdd74de9028777231dac30cbefe0

Update readme

Charles Lehner committed on 2/10/2015, 5:48:52 PM
Parent: 378c8b78a1a63307a4f41c22709ff8a0ac8026a3

Files changed

README.mdchanged
README.mdView
@@ -2,25 +2,26 @@
22 ### [Sparklines](https://github.com/holman/spark) as PNGs
33
44 ![histogram](https://cloud.githubusercontent.com/assets/95347/6131872/f78ab708-b11c-11e4-9ae2-fd6cd0ec2b76.png)
55
6 +Uses [LuPng](https://github.com/jansol/LuPng).
7 +
68 ## Install
79 ```
810 make
911 [sudo] make install [PREFIX=/usr/local]
1012 ```
1113
1214 ## Usage
1315 ```
14-pngspark [-h height] [-c color] [-s scaling] output.png
16 +echo 1 2 3 ... | pngspark [-h height] [-c color] [-s scaling] output.png
1517 ```
16-Pipe numbers to pngspark to add them to the image.
1718
1819 ### Options
1920 * `-h height`: the height of the image in pixels
2021 * `-c color`: the color of the foreground, as #rrggbb hex
21-* `-s scaling`: scaling factor. 0 to do no scaling, 1 to make the minimum
22- value be at the bottom of the image
22 +* `-s scaling`: scaling factor. 0 to keep things proportional, 1 to make the
23 + minimum value be at the bottom of the image
2324
2425 ## Examples
2526
2627 Display BTC ticker data
@@ -36,20 +37,22 @@
3637 ![sine](https://cloud.githubusercontent.com/assets/95347/6132308/b42da1d4-b11f-11e4-9748-5b61febd9df9.png)
3738
3839 ## API
3940
41 +Generate pngsparks in your own C programs!
42 +
4043 ```c
4144 struct pngspark;
4245 ```
4346 A png spark instance: collection of values and settings.
4447
4548 ```c
4649 int pngspark_init(struct pngspark *ps, size_t height, const char *color, double scaling);
4750 ```
48-Initialize a pngspark struct.
51 +Initialize a pngspark struct. Arguments are as in the command-line options.
4952
5053 ```c
51-int pngspark_append(struct pngspark *ps, double, value);
54 +int pngspark_append(struct pngspark *ps, double value);
5255 ```
5356 Append a value to the pngspark.
5457
5558 ```c

Built with git-ssb-web