Crates.io | csvgen |
lib.rs | csvgen |
version | 0.1.1 |
source | src |
created_at | 2018-05-08 21:58:16.787217 |
updated_at | 2018-05-08 22:18:21.195034 |
description | small utility to create mock-csvfiles. |
homepage | |
repository | https://github.com/joppich/csvgen |
max_upload_size | |
id | 64394 |
size | 16,801 |
a small utility to create mock-csv files with various datatypes.
All commandline parameters are optional.
size: required filesize
default: 2 MB
header: create column headers
default: string, float, int
column-types: pass types for column values
default: string, float, int
filepath: write to provided path
default: stdout
$ csvgen --help
csvgen 0.1.0
jkm <jkm@bricknet.de>
Generate mock csv-files with various datatypes.
USAGE:
csvgen [FLAGS] [OPTIONS]
FLAGS:
--help Prints help information
-h, --header Print column headers.
-V, --version Prints version information
OPTIONS:
-c, --column-types <Column Types> Specify types for columns.
-f, --filepath <File path> Write to file path instead of stdout.
-s, --size <Size> Specify size of output file in MB.
$ csvgen -s 1 | tail -5
"pass cute",234.63565236879606,-1574574
"modern pleasure found various",-370.60698067726923,172070
"burn vegetable modern various",-257.9846409797992,-155605
"knowing",515.0382860189012,-1358241
"explain thank dress",500.2067882269995,1523743
$ csvgen -h -c int,string,int,string,int -f /tmp/foo.csv
$ head -5 /tmp/foo.csv
int,string,int,string,int
935304,"knowing explain burn sofa",-219593,"sofa sofa",1119124
-1141850,"dress modern vegetable knowing",-740429,"compare cute agree",861869
-1628699,"dress sofa grateful",-1109470,"agree explain",632448
-684272,"cooing tail",639600,"dress",1110599