Releases: caltechlibrary/datatools
csvrows - bug fixes and added random row support
Fixed some range expression bugs, added tests, now supporting ranges expressions like 11-13 as well as colon notation of 11:13. Range expressions can be compound expressions e.g. 1,2,8-10 or 1,2,8:10.
Fixed output bug on csvrows. If no rows expressions provided and input is read from standard in then all rows will be written back out (validated through go's csv encoder/decoder). Show header option now respected correctly in csvrows.
Quoting bug fix in jsoncols
Fixed a quoting bug in jsoncols, updated test_cmds.bash to test for bug.
Bug fixes, normalization of options and io, documentation changes
datatools now uses a common vocabulary for options and input/output/error handling. This changed all the tools and in some cases changed the names of options. This will brake some scripts where the option names changed, were removed or behavior standardized.
The new string command conforms with the changes while retaining its "action" oriented syntax. A number of string specific commands have been removed along with the experimental vcard2json command. The documentation has been substantially re-organized.
string command
The experimental string functions (e.g. toupper, tolower, joinstring, splitstring) have been consolidated in a single command called string. Starting migrating to new Cli object in cli v0.0.5. Most cmds still using old Config. Added test_cmds.bash for testing the string command and will add more tests for others as I migrate to new cli code.
string functions
Added several new string related command line tools - joinstring, hasprefix, hassuffix, trimprefix, trimsuffix, toupper, tolower and totitle. Bug fixes, cleaned up docs. timefmt had two options renamed -input
became -input-format
and -output
became -output-format
to better align with the usage of -input
and -output
in the rest of the tools.
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.