tsfutil
Name
TS File utility - tool to convert TSF files from/to JSON or CSV.
Synopsis
$ tsfutil [global options] command [options] <tsffile> [infile|outfile]
Description
Where global options are:-
-s schema.json
Path to file that contains TSF schema
-
-F json|jsonraw|csv
Input/output tsfutil format - default is json
Subcommand is one of:
-
create
creates new TSF file from specified schema
-
count
prints number of entries in TSF file
-
get
read entries from tsffile and write them to outfile or stdin
if it is not specified. By default reads all entries from file.
To specify desired range of entries, specify option -g:
-
add
adds entries from infile to tsffile
Also, one of backend options may be specified using -o option:
-o <backend option>
JSON options:
-
one - if getting only one entry, print it alone, not array of single nodes
CSV options:
-
header=<header> - additional CSV header if not specified in CSV file (for 'add' command) or header that would be used during export for 'get' command. You may specify not all columns to create tsffile slice. Also through this option you may provide header hints. For boolean columns you may change default true and false literals:
-o header=somefield:yes:no
For integer values you may append "unsigned" or "hex" hint:
-o header=int1:unsigned,flags:hex
-
noheader - if specified for 'get' subcommand, tsfutil don't write header into file. If specified for 'add' subcommand, means that CSV file do not contain valid header and header, specified by 'header=' option should be used.
-
all - for 'get' subcommand - retrieve all fields from tsffile, not just specified in 'header=' option
-
valsep - separator for columns. Default is comma
-
optsep - separator for column hints inside header. Default is semicolon.