Crates.io | csvcellplot |
lib.rs | csvcellplot |
version | 0.1.0 |
source | src |
created_at | 2023-03-05 17:10:24.023278 |
updated_at | 2023-03-05 17:10:24.023278 |
description | CSV to image converter, plotting multiple columns of numbers using blocks with varied lightness |
homepage | |
repository | https://github.com/vi/csvcellplot |
max_upload_size | |
id | 801605 |
size | 110,621 |
Command-line tool to convert CSV files to images where each number in CSV correspond to a rectangle coloured depending on that number.
$ printf 'a,b,c\n1,2,3\n1,2,3\n1,2,3\n2,3,4\n1,4,3\n0,4,2\n0,4,2\n0,4,2\n'
a,b,c
1,2,3
1,2,3
1,2,3
2,3,4
1,4,3
0,4,2
0,4,2
0,4,2
$ printf 'a,b,c\n1,2,3\n1,2,3\n1,2,3\n2,3,4\n1,4,3\n0,4,2\n0,4,2\n0,4,2\n' | csvcellplot sample1.png
$ printf 'a,b,c\n1,2,3\n1,2,3\n1,2,3\n2,3,4\n1,4,3\n0,4,2\n0,4,2\n0,4,2\n' | csvcellplot -g out.png
Download a pre-built executable from Github releases or install from source code with cargo install --path .
or cargo install csvcellplot
.
Usage: csvcellplot <output_file> [-W <image-width>] [-i <input-csv>] [-w <cell-width>] [-h <cell-height>] [-n] [-H] [--debug-filterted-csv <debug-filterted-csv>] [-c <colour-overrides>] [-S <default-saturation>] [-x <default-min-lightness>] [-X <default-max-lightness>] [-G <default-gradientness>] [-D <default-hue-drift>] [-R <max-cells-in-row>] [-g] [--legend-font <legend-font>] [--legend-font-scale <legend-font-scale>]
read csv data from stdin and write png to file
Positional Arguments:
output_file name of output file to write png image to
Options:
-W, --image-width width of the image to write, default 1920 or automatic if -R
is present
-i, --input-csv input file to read CSV from, instead of stdin
-w, --cell-width width of a cell, in pixels
-h, --cell-height height of a cell, in pixels
-n, --no-fiter do not run data though filter (interpolation), assume they
are already from 0 to 1.
-H, --no-hide do not hide trivial series
--debug-filterted-csv
output additionla csv with filtered (interpolated) data
-c, --colour-overrides
explicitly specify column colours, like
`column1=red,column2=FF00FF` colours may also contain a
number of modifier postfix characters: `+`, `-` - shift hue
`/` - desaturate. `@` - hue drift `_`,`.` -
decrease,increase min lightness `^`, `~` - decrease,
increase max lightness `%`, `&` - decrease, increase
gradientness
-S, --default-saturation
use this saturation value for colours not specified
explicitly. Defaults to 1.0.
-x, --default-min-lightness
defaults to 0.2
-X, --default-max-lightness
defaults to 0.75
-G, --default-gradientness
defaults to 0.0
-D, --default-hue-drift
shift hue toghether with lightness. defaults to 0.0
-R, --max-cells-in-row
maximum number of cell of one data series in a row
-g, --grayscale shotrcut for -x 0 -X 1 -S 0
--legend-font font file (ttf) to render legend text. Default is embedded
font Dharma Type Sometype Mono
--legend-font-scale
font scale to render legend text. Default is 14. Setting it
to 0 prevents rendering legend.
--help display usage information
Code is licensed with MIT or Apache-2.0. Embedded font file is licensed with IL Open Font License.