Releases: caltechlibrary/datatools
csvcleaner added
This release adds another tool, csvcleaner, which does some CSV normalization based for column count, leading/trailing spaces, comments and delimiter based on options selected.
splitstrings cli
This release adds a cli called splitstring which supports splitting a string into a JSON array or a new line delimited list.
Bug fixes, jsoncols
When v0.0.14 was pushed out jsoncols defaulted to pushing out CSV formatted output, this broke the jsoncols as JSON filter use case. CSV output is now an option and jsoncols reverts to outputing JSON formatted results.
Incremental Improvemnts
Bugs fixes, documentation fixes, jsoncols now uses encoding/csv for output.
jsonjoin improvements
Add support to explicitly create an empty root JSON object to join against or specify a root JSON object read from standard input or a specified file. Improved documentation describing default behavior as branching merge with options for flat merges via -update and -overwrite.
jsonjoin
Harmonizing csv commands
All the csv commands now support setting a character delimiter. This allows us to use the csv commands with other delimiters (e.g. colon or pipe delimited files). Unless noted the delimiter affects both input and output.
Here's an example of using csvfind one a pipe delimited file called file.txt looking for "Fred" in the second
column.
csvfind -i file.txt -d '|' -col 2 "Fred"
Combined release of shelltools and datatools
This release marks the merging of shelltools and datatools projects. Moving forward improvements, bug fixes will happen in the datatools project.
New parameters and installation process
The primary feature of this release is individual Zip files for compiled binaries based on platform. Additional two commands, jsoncols and jsonrange, now have a "-permissive" option which suppress errors codes and messages (useful in Bash scripting where an empty string is sufficient).
Column counting from 1 instead of zero
I've updated the command line options for csvcols, csvfind and csvjoin to reference column number starting with column one rather than column zero. This makes the behavior match how cut works (e.g. -f 1 for first field) as well as how most people think of counting columns in spreadsheets.