Crates.io | rendercsv |
lib.rs | rendercsv |
version | 0.1.0 |
source | src |
created_at | 2024-08-07 22:14:36.807191 |
updated_at | 2024-08-07 22:14:36.807191 |
description | Command line tool to convert CSV table to a png picture |
homepage | |
repository | https://github.com/vi/rendercsv |
max_upload_size | |
id | 1328856 |
size | 96,174 |
Command line tool to quicky get picture from CSV file, manually specifyig cell dimensions. Main use case is to create create animated tables from a series of CSV files (obtained e.g. using qsv partition --drop
).
Text in a cell is parsed for the following prefixes:
rot:
- rotate this celll=N:
- set cell background colour lightness to Ns=N:
- set cell background colour saturation to Nh=N:
- set cell background colour hue to N$ cat test.csv
row,rot:Alpha Bravo,rot:Charlie Delta,rot:Echo Foxtrot
row1,1,2,3
row2,2,3,h=30:s=40:19
row3,l=90:0,l=90:0,l=90:0
$ rendercsv test.csv test2.png --first-column-width 40 --column-width 16 --first-row-height 90 -W 100 -H 150
Download a pre-built executable from Github releases or install from source code with cargo install --path .
or cargo install rendercsv
.
Usage: rendercsv [OPTIONS] <INPUT_CSV> <OUTPUT_PNG>
Arguments:
<INPUT_CSV>
<OUTPUT_PNG>
Options:
-W, --width <WIDTH>
[default: 1280]
-H, --height <HEIGHT>
[default: 720]
--font <FONT>
font file (ttf) to render legend text. Default is embedded font Dharma Type Sometype Mono
-s, --font-scale <FONT_SCALE>
Text size [default: 12.0]
-Y, --first-row-height <FIRST_ROW_HEIGHT>
[default: 60]
-y, --row-height <ROW_HEIGHT>
[default: 16]
-X, --first-column-width <FIRST_COLUMN_WIDTH>
[default: 80]
-x, --column-width <COLUMN_WIDTH>
[default: 60]
-h, --help
Print help