diff --git a/README.md b/README.md index 3f288f3..d2f5c6e 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,20 @@ Posix shell scripting (e.g. writing scripts that run under Bash). The tools are Command line utilities for simplifying work with CSV, JSON, Excel Workbooks and plain text files or content. -+ [csv2json](docs/csv2json.html) - a tool to take a CSV file and convert it into a JSON array or a list of JSON blobs one per line -+ [csv2mdtable](docs/csv2mdtable.html) - a tool to render CSV as a Github Flavored Markdown table -+ [csv2xlsx](docs/csv2xlsx.html) - a tool to take a CSV file and add it as a sheet to a Excel Workbook -+ [csvcleaner](docs/csvcleaner.html) - normalize a CSV file by column and row including trimming spaces and removing comments -+ [csvcols](docs/csvcols.html) - a tool for formatting command line arguments into CSV row of columns or filtering CSV rows for specific columns -+ [csvfind](docs/csvfind.html) - a tool for filtering a CSV file rows by column -+ [csvjoin](docs/csvjoin.html) - a tool to join two CSV files on common values in designated columns, writes combined CSV rows -+ [csvrows](docs/csvrows.html) - a tool for formatting command line arguments into CSV columns of rows or filtering CSV columns for specific rows -+ [jsoncols](docs/jsoncols.html) - a tool for exploring and extracting JSON values into columns -+ [jsonjoin](docs/jsonjoin.html) - a tool for joining JSON object documents -+ [jsonmunge](docs/jsonmunge.html) - a tool to transform JSON documents into something else -+ [jsonrange](docs/jsonrange.html) - a tool for iterating over JSON objects and arrays (return keys or values) -+ [xlsx2csv](docs/xlsx2csv.html) - a tool for converting Excel Workbooks sheets to CSV files -+ [xlsx2json](docs/xlsx2json.html) - a tool for converting Excel Workbooks to JSON files ++ [csv2json](docs/csv2json/) - a tool to take a CSV file and convert it into a JSON array or a list of JSON blobs one per line ++ [csv2mdtable](docs/csv2mdtable/) - a tool to render CSV as a Github Flavored Markdown table ++ [csv2xlsx](docs/csv2xlsx/) - a tool to take a CSV file and add it as a sheet to a Excel Workbook ++ [csvcleaner](docs/csvcleaner/) - normalize a CSV file by column and row including trimming spaces and removing comments ++ [csvcols](docs/csvcols/) - a tool for formatting command line arguments into CSV row of columns or filtering CSV rows for specific columns ++ [csvfind](docs/csvfind/) - a tool for filtering a CSV file rows by column ++ [csvjoin](docs/csvjoin/) - a tool to join two CSV files on common values in designated columns, writes combined CSV rows ++ [csvrows](docs/csvrows/) - a tool for formatting command line arguments into CSV columns of rows or filtering CSV columns for specific rows ++ [jsoncols](docs/jsoncols/) - a tool for exploring and extracting JSON values into columns ++ [jsonjoin](docs/jsonjoin/) - a tool for joining JSON object documents ++ [jsonmunge](docs/jsonmunge/) - a tool to transform JSON documents into something else ++ [jsonrange](docs/jsonrange/) - a tool for iterating over JSON objects and arrays (return keys or values) ++ [xlsx2csv](docs/xlsx2csv/) - a tool for converting Excel Workbooks sheets to CSV files ++ [xlsx2json](docs/xlsx2json/) - a tool for converting Excel Workbooks to JSON files Compiled versions are provided for Linux (amd64), Mac OS X (amd64), @@ -58,13 +58,13 @@ See [string](docs/string/) for full details Various utilities for simplifying work on the command line. -+ [findfile](docs/findfile.html) - find files based on prefix, suffix or contained string -+ [finddir](docs/finddir.html) - find directories based on prefix, suffix or contained string -+ [mergepath](docs/mergepath.html) - prefix, append, clip path variables -+ [range](docs/range.html) - emit a range of integers (useful for numbered loops in Bash) -+ [reldate](docs/reldate.html) - display a relative date in YYYY-MM-DD format -+ [timefmt](docs/timefmt.html) - format a time value based on Golang's time format language -+ [urlparse](docs/urlparse.html) - split a URL into parts ++ [findfile](docs/findfile/) - find files based on prefix, suffix or contained string ++ [finddir](docs/finddir/) - find directories based on prefix, suffix or contained string ++ [mergepath](docs/mergepath/) - prefix, append, clip path variables ++ [range](docs/range/) - emit a range of integers (useful for numbered loops in Bash) ++ [reldate](docs/reldate/) - display a relative date in YYYY-MM-DD format ++ [timefmt](docs/timefmt/) - format a time value based on Golang's time format language ++ [urlparse](docs/urlparse/) - split a URL into parts Compiled versions are provided for Linux (amd64), Mac OS X (amd64), Windows 10 (amd64) and Raspbian (ARM7). See https://github.com/caltechlibrary/datatools/releases. @@ -74,7 +74,7 @@ Use the utilities try "-help" option for a full list of options. ## Installation -See [INSTALL.md](install.html) for details for installing pre-compiled versions of the programs. +See [INSTALL.md](install/) for details for installing pre-compiled versions of the programs. _datatools_ are go get-able. If you have go v1.8 (or newer) you can install with the command below. diff --git a/cmds/string/string.go b/cmds/string/string.go index 4c95b90..e3cf058 100644 --- a/cmds/string/string.go +++ b/cmds/string/string.go @@ -45,6 +45,26 @@ string is a command line tool for transforming strings in common ways. ` examples = ` +Convert text to upper case + + string toupper "one" + +Convert text to lower case + + string tolower "ONE" + +Captialize an English phrase + + string englishtitle "one more thing to know" + +Split a space newline delimited list of words into a JSON array + + string -i wordlist.txt split "\n" + +Join a JSON array of strings into a newline delimited list + + string join '\n' '["one","two","three","four","five"]' + ` // Standard Options @@ -60,6 +80,8 @@ string is a command line tool for transforming strings in common ways. eol string // App Options + delimiter string + outputDelimiter string ) // @@ -161,7 +183,7 @@ func doSplit(in io.Reader, out io.Writer, eout io.Writer, args []string) int { fmt.Fprintln(eout, "first parameter is the delimiting string") return 1 } - delimiter := args[0] + delimiter := datatools.NormalizeDelimiter(args[0]) args = args[1:] // Handle the case where out input is piped in or read from a file. if inputFName != "" { @@ -185,7 +207,7 @@ func doSplitN(in io.Reader, out io.Writer, eout io.Writer, args []string) int { fmt.Fprintln(eout, "first parameter is the delimiting string, second is the count") return 1 } - delimiter := args[0] + delimiter := datatools.NormalizeDelimiter(args[0]) // Now convert to cnt an integer cnt, err := strconv.Atoi(args[1]) if err != nil { @@ -216,7 +238,7 @@ func doJoin(in io.Reader, out io.Writer, eout io.Writer, args []string) int { fmt.Fprintln(eout, "first parameter is the delimiter to join with") return 1 } - delimiter := args[0] + delimiter := datatools.NormalizeDelimiter(args[0]) args = args[1:] // Handle the case where out input is piped in or read from a file. @@ -388,6 +410,20 @@ func doTrimRight(in io.Reader, out io.Writer, eout io.Writer, args []string) int return 0 } +func doTrimSpace(in io.Reader, out io.Writer, eout io.Writer, args []string) int { + // Handle content coming from file + if inputFName != "" { + src, err := ioutil.ReadAll(in) + exitOnError(eout, err, quiet) + args = append(args, string(src)) + } + // Handle content common from args + for _, arg := range args { + fmt.Fprintf(out, "%s%s", strings.TrimSpace(arg), eol) + } + return 0 +} + func doContains(in io.Reader, out io.Writer, eout io.Writer, args []string) int { if len(args) < 1 { fmt.Fprintf(eout, "first parameter is the target string\n") @@ -585,6 +621,8 @@ func main() { app.BoolVar(&generateMarkdownDocs, "generate-markdown-docs", false, "output documentation in Markdown") // App Options + app.StringVar(&delimiter, "d,delimiter", "", "set the delimiter") + app.StringVar(&outputDelimiter, "do,output-delimiter", "", "set the output delimiter") // Add verbs and functions app.AddAction("toupper", doToUpper, "to upper case: [STRING]") @@ -601,6 +639,7 @@ func main() { app.AddAction("trim", doTrim, "trim (beginning and end), CUTSET [STRING]") app.AddAction("trimleft", doTrimLeft, "left trim: CUTSET [STRING]") app.AddAction("trimright", doTrimRight, "right trim: CUTSET [STRING]") + app.AddAction("trimspace", doTrimSpace, "trim leading and trailing spaces: [STRING]") app.AddAction("count", doCount, "count substrings: SUBSTRING [STRING]") app.AddAction("contains", doContains, "has substrings: SUBSTRING [STRING]") app.AddAction("length", doLength, "length of string: [STRING]") @@ -623,7 +662,7 @@ func main() { cli.ExitOnError(app.Eout, err, quiet) defer cli.CloseFile(inputFName, app.In) - app.Out, err = cli.Create(inputFName, os.Stdout) + app.Out, err = cli.Create(outputFName, os.Stdout) cli.ExitOnError(app.Eout, err, quiet) defer cli.CloseFile(outputFName, app.Out) diff --git a/docs/csvcols/index.html b/docs/csvcols/index.html index 8bbd47f..01efaef 100644 --- a/docs/csvcols/index.html +++ b/docs/csvcols/index.html @@ -35,19 +35,19 @@
-col, -cols output specified columns (e.g. -col 1,12:14,2,4))
- -d, -delimiter set the input delimiter character
- -examples display example
- -generate-markdown-docs generate markdown documentation
- -h, -help display help
- -i, -input input filename
- -l, -license display license
- -o, -output output filename
- -od, -output-delimiter set the output delimiter character
- -quiet suppress error messages
- -skip-header-row skip the header row
- -uuid add a prefix row with generated UUID cell
- -v, -version display version
+ -col, -cols output specified columns (e.g. -col 1,12:14,2,4))
+ -d, -delimiter set the input delimiter character
+ -examples display example
+ -generate-markdown-docs generate markdown documentation
+ -h, -help display help
+ -i, -input input filename
+ -l, -license display license
+ -o, -output output filename
+ -od, -output-delimiter set the output delimiter character
+ -quiet suppress error messages
+ -skip-header-row skip the header row
+ -uuid add a prefix row with generated UUID cell
+ -v, -version display version
EXAMPLES
diff --git a/docs/csvcols/index.md b/docs/csvcols/index.md
index 1c03056..6b9b72d 100644
--- a/docs/csvcols/index.md
+++ b/docs/csvcols/index.md
@@ -14,19 +14,19 @@ listed on the commandline (first column is 1 not 0).
## OPTIONS
```
- -col, -cols output specified columns (e.g. -col 1,12:14,2,4))
- -d, -delimiter set the input delimiter character
- -examples display example
- -generate-markdown-docs generate markdown documentation
- -h, -help display help
- -i, -input input filename
- -l, -license display license
- -o, -output output filename
- -od, -output-delimiter set the output delimiter character
- -quiet suppress error messages
- -skip-header-row skip the header row
- -uuid add a prefix row with generated UUID cell
- -v, -version display version
+ -col, -cols output specified columns (e.g. -col 1,12:14,2,4))
+ -d, -delimiter set the input delimiter character
+ -examples display example
+ -generate-markdown-docs generate markdown documentation
+ -h, -help display help
+ -i, -input input filename
+ -l, -license display license
+ -o, -output output filename
+ -od, -output-delimiter set the output delimiter character
+ -quiet suppress error messages
+ -skip-header-row skip the header row
+ -uuid add a prefix row with generated UUID cell
+ -v, -version display version
```
diff --git a/docs/string/index.html b/docs/string/index.html
index bddbfc8..4c1f9a3 100644
--- a/docs/string/index.html
+++ b/docs/string/index.html
@@ -44,15 +44,17 @@ OPTIONS
Options are shared between all actions and must precede the action on the command line.
- -e, -examples display examples
- -generate-markdown-docs output documentation in Markdown
- -h, -help display help
- -i, -input input file name
- -l, -license display license
- -nl, -newline if true add a trailing newline
- -o, -output output file name
- -quiet suppress error messages
- -v, -version display version
+ -d, -delimiter set the delimiter
+ -do, -output-delimiter set the output delimiter
+ -e, -examples display examples
+ -generate-markdown-docs output documentation in Markdown
+ -h, -help display help
+ -i, -input input file name
+ -l, -license display license
+ -nl, -newline if true add a trailing newline
+ -o, -output output file name
+ -quiet suppress error messages
+ -v, -version display version
ACTIONS
@@ -79,12 +81,38 @@ ACTIONS
trimleft left trim: CUTSET [STRING]
trimprefix trims prefix: PREFIX [STRING]
trimright right trim: CUTSET [STRING]
+ trimspace trim leading and trailing spaces: [STRING]
trimsuffix trim suffix: SUFFIX [STRING]
EXAMPLES
-Related: contains, count, englishtitle, hasprefix, hassuffix, join, length, padleft, padright, position, replace, replacen, slice, split, splitn, tolower, totitle, toupper, trim, trimleft, trimprefix, trimright, trimsuffix
+Convert text to upper case
+
+string toupper "one"
+
+
+Convert text to lower case
+
+string tolower "ONE"
+
+
+Captialize an English phrase
+
+string englishtitle "one more thing to know"
+
+
+Split a space newline delimited list of words into a JSON array
+
+string -i wordlist.txt split "\n"
+
+
+Join a JSON array of strings into a newline delimited list
+
+string join '\n' '["one","two","three","four","five"]'
+
+
+Related: contains, count, englishtitle, hasprefix, hassuffix, join, length, padleft, padright, position, replace, replacen, slice, split, splitn, tolower, totitle, toupper, trim, trimleft, trimprefix, trimright, trimspace, trimsuffix
string v0.0.20-pre
diff --git a/docs/string/index.md b/docs/string/index.md
index 5de6984..2618e52 100644
--- a/docs/string/index.md
+++ b/docs/string/index.md
@@ -21,15 +21,17 @@ string is a command line tool for transforming strings in common ways.
Options are shared between all actions and must precede the action on the command line.
```
- -e, -examples display examples
- -generate-markdown-docs output documentation in Markdown
- -h, -help display help
- -i, -input input file name
- -l, -license display license
- -nl, -newline if true add a trailing newline
- -o, -output output file name
- -quiet suppress error messages
- -v, -version display version
+ -d, -delimiter set the delimiter
+ -do, -output-delimiter set the output delimiter
+ -e, -examples display examples
+ -generate-markdown-docs output documentation in Markdown
+ -h, -help display help
+ -i, -input input file name
+ -l, -license display license
+ -nl, -newline if true add a trailing newline
+ -o, -output output file name
+ -quiet suppress error messages
+ -v, -version display version
```
@@ -58,6 +60,7 @@ Options are shared between all actions and must precede the action on the comman
trimleft left trim: CUTSET [STRING]
trimprefix trims prefix: PREFIX [STRING]
trimright right trim: CUTSET [STRING]
+ trimspace trim leading and trailing spaces: [STRING]
trimsuffix trim suffix: SUFFIX [STRING]
```
@@ -65,8 +68,28 @@ Options are shared between all actions and must precede the action on the comman
## EXAMPLES
+Convert text to upper case
+ string toupper "one"
-Related: [contains](contains.html), [count](count.html), [englishtitle](englishtitle.html), [hasprefix](hasprefix.html), [hassuffix](hassuffix.html), [join](join.html), [length](length.html), [padleft](padleft.html), [padright](padright.html), [position](position.html), [replace](replace.html), [replacen](replacen.html), [slice](slice.html), [split](split.html), [splitn](splitn.html), [tolower](tolower.html), [totitle](totitle.html), [toupper](toupper.html), [trim](trim.html), [trimleft](trimleft.html), [trimprefix](trimprefix.html), [trimright](trimright.html), [trimsuffix](trimsuffix.html)
+Convert text to lower case
+
+ string tolower "ONE"
+
+Captialize an English phrase
+
+ string englishtitle "one more thing to know"
+
+Split a space newline delimited list of words into a JSON array
+
+ string -i wordlist.txt split "\n"
+
+Join a JSON array of strings into a newline delimited list
+
+ string join '\n' '["one","two","three","four","five"]'
+
+
+
+Related: [contains](contains.html), [count](count.html), [englishtitle](englishtitle.html), [hasprefix](hasprefix.html), [hassuffix](hassuffix.html), [join](join.html), [length](length.html), [padleft](padleft.html), [padright](padright.html), [position](position.html), [replace](replace.html), [replacen](replacen.html), [slice](slice.html), [split](split.html), [splitn](splitn.html), [tolower](tolower.html), [totitle](totitle.html), [toupper](toupper.html), [trim](trim.html), [trimleft](trimleft.html), [trimprefix](trimprefix.html), [trimright](trimright.html), [trimspace](trimspace.html), [trimsuffix](trimsuffix.html)
string v0.0.20-pre
diff --git a/gen-nav.bash b/gen-nav.bash
index 5b07569..8936cb1 100755
--- a/gen-nav.bash
+++ b/gen-nav.bash
@@ -3,20 +3,20 @@
GIT_REPO="https://github.com/caltechlibrary/datatools"
function write_nav() {
-DNAME="$1"
-finddir -depth 2 ${DNAME} | while read D; do
- if [[ "$D" != "." ]]; then
- echo "Writing ${DNAME}${D}/nav.md"
- RELPATH=$(reldocpath ${DNAME}"${D}" .)
- mkpage nav.tmpl relroot="text:${RELPATH}" \
- readme="text:${RELPATH}index.html" \
- docs="text:${RELPATH}docs/" \
- install="text:${RELPATH}INSTALL.html" \
- howto="text:${RELPATH}how-to/" \
- gitrepo="text:${GIT_REPO}" \
- >"${DNAME}${D}/nav.md"
- fi
-done
+ DNAME="$1"
+ finddir -depth 2 ${DNAME} | while read D; do
+ if [[ "$D" != "." ]]; then
+ echo "Writing ${DNAME}${D}/nav.md"
+ RELPATH=$(reldocpath ${DNAME}"${D}" .)
+ mkpage nav.tmpl relroot="text:${RELPATH}" \
+ readme="text:${RELPATH}index.html" \
+ docs="text:${RELPATH}docs/" \
+ install="text:${RELPATH}INSTALL.html" \
+ howto="text:${RELPATH}how-to/" \
+ gitrepo="text:${GIT_REPO}" \
+ >"${DNAME}${D}/nav.md"
+ fi
+ done
}
# root nav
diff --git a/gen-usage-pages.bash b/gen-usage-pages.bash
new file mode 100755
index 0000000..7765925
--- /dev/null
+++ b/gen-usage-pages.bash
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if [ ! -d bin ]; then
+ echo "Run make before running this script."
+ exit
+fi
+ls -1 bin/ | while read ITEM; do
+ D=$(basename "${ITEM}")
+ "bin/${ITEM}" -generate-markdown-docs > "docs/${D}/index.md"
+done
diff --git a/how-to/convert-lines-into-an-array.html b/how-to/convert-lines-into-an-array.html
new file mode 100644
index 0000000..2343776
--- /dev/null
+++ b/how-to/convert-lines-into-an-array.html
@@ -0,0 +1,54 @@
+
+
+
+ Caltech Library's Digital Library Development Sandbox
+
+
+
+
+
+
+
+
+
+
+Convert lines of text into an array
+
+Given the following text in a file named t.txt.
+
+ one
+ two
+ three
+
+
+How to you get ["one","two","three"]
using the string command?
+
+On approach that might need like it’d work would be to use the join
+action word with the string command. But that wouldn’t given you what
+you want. You actually want to “split” the text file on the new line character.
+
+ string -i t.txt split "\n"
+
+
+
+
+
+
+
diff --git a/how-to/convert-lines-into-an-array.md b/how-to/convert-lines-into-an-array.md
new file mode 100644
index 0000000..12a1279
--- /dev/null
+++ b/how-to/convert-lines-into-an-array.md
@@ -0,0 +1,20 @@
+
+# Convert lines of text into an array
+
+Given the following text in a file named _t.txt_.
+
+```
+ one
+ two
+ three
+```
+
+How to you get `["one","two","three"]` using the string command?
+
+On approach that might need like it'd work would be to use the *join*
+action word with the _string_ command. But that wouldn't given you what
+you want. You actually want to "split" the text file on the new line character.
+
+```shell
+ string -i t.txt split "\n"
+```
diff --git a/how-to/index.html b/how-to/index.html
index ae39c85..eef3a76 100644
--- a/how-to/index.html
+++ b/how-to/index.html
@@ -25,8 +25,10 @@
How To …
+- Convert lines into an array
- Find duplicates in a column
- Reorder a comma delimited string
+- Trim a trailing newline from a text file
Use (by tool)
@@ -48,6 +50,18 @@ Use (by tool)
jsonrange
range
reldate
+string
+
+
+- change case: lower, upper, title, english title
+- contains, has prefix, has suffix
+- count, length, position
+- join, split, split N times
+- pad left, pad right
+- replace, replace N times
+- get a slice
+- trim, trim left, trim a prefix, trim right, trim spaces, trim suffix
+
timefmt
urlparse
xlsx2csv
diff --git a/how-to/index.md b/how-to/index.md
index 26addca..3966f5a 100644
--- a/how-to/index.md
+++ b/how-to/index.md
@@ -1,8 +1,10 @@
# How To ...
++ [Convert lines into an array](convert-lines-into-an-array.html)
+ [Find duplicates in a column](find-duplicates-in-a-column.html)
+ [Reorder a comma delimited string](reorder-a-comma-delimited-string.html)
++ [Trim a trailing newline from a text file](trim-a-trailing-newline-from-a-text-file.html)
## Use (by tool)
@@ -22,6 +24,15 @@
+ [jsonrange](jsonrange/)
+ [range](range/)
+ [reldate](reldate/)
++ [string](string/)
+ + change case: [lower](string/tolower.html), [upper](string/toupper.html), [title](string/title.html), [english title](string/englishtitle.html)
+ + [contains](string/contains.html), [has prefix](string/hasprefix.html), [has suffix](string/hassuffix.html)
+ + [count](string/count.html), [length](string/length.html), [position](string/position.html)
+ + [join](string/join.html), [split](string/split.html), [split N times](string/splitn.html)
+ + [pad left](string/padleft.html), [pad right](string/padright.html)
+ + [replace](string/replace.html), [replace N times](string/replacen.html)
+ + [get a slice ](string/slice.html)
+ + [trim](string/trim.html), [trim left](string/trimleft.html), [trim a prefix](string/trimprefix.html), [trim right](string/trimright.html), [trim spaces](string/trimspace.html), [trim suffix](string/trimsuffix.html)
+ [timefmt](timefmt/)
+ [urlparse](urlparse/)
+ [xlsx2csv](xlsx2csv/)
diff --git a/how-to/trim-a-trailing-newline-from-a-text-file.html b/how-to/trim-a-trailing-newline-from-a-text-file.html
new file mode 100644
index 0000000..43461fc
--- /dev/null
+++ b/how-to/trim-a-trailing-newline-from-a-text-file.html
@@ -0,0 +1,66 @@
+
+
+
+ Caltech Library's Digital Library Development Sandbox
+
+
+
+
+
+
+
+
+
+
+How to trim a trailing newline from a text file.
+
+Given the following text in a file name t.txt where the last line contains a trailing newline.
+
+ one
+ two
+ three
+
+
+Running split to create an JSON array yields an extra empty string.
+
+ string -i t.txt split '\n'
+
+
+Yields
+
+ ["one","two","three",""]
+
+
+To avoid the trailing empty string in the array you can trimspace first then do your
+split on newlines.
+
+ string -i t.txt trimspace | split -i - '\n'
+
+
+Yields
+
+ ["one","two","three"]
+
+
+
+
+
+
+
diff --git a/how-to/trim-a-trailing-newline-from-a-text-file.md b/how-to/trim-a-trailing-newline-from-a-text-file.md
new file mode 100644
index 0000000..ef610bc
--- /dev/null
+++ b/how-to/trim-a-trailing-newline-from-a-text-file.md
@@ -0,0 +1,35 @@
+
+# How to trim a trailing newline from a text file.
+
+Given the following text in a file name _t.txt_ where the last line contains a trailing newline.
+
+```
+ one
+ two
+ three
+```
+
+Running *split* to create an JSON array yields an extra empty string.
+
+```shell
+ string -i t.txt split '\n'
+```
+
+Yields
+
+```json
+ ["one","two","three",""]
+```
+
+To avoid the trailing empty string in the array you can *trimspace* first then do your
+*split* on newlines.
+
+```shell
+ string -i t.txt trimspace | split -i - '\n'
+```
+
+Yields
+
+```json
+ ["one","two","three"]
+```
diff --git a/index.html b/index.html
index dc99ca2..248e627 100644
--- a/index.html
+++ b/index.html
@@ -32,20 +32,20 @@ For data
Command line utilities for simplifying work with CSV, JSON, Excel Workbooks and plain text files or content.
-- csv2json - a tool to take a CSV file and convert it into a JSON array or a list of JSON blobs one per line
-- csv2mdtable - a tool to render CSV as a Github Flavored Markdown table
-- csv2xlsx - a tool to take a CSV file and add it as a sheet to a Excel Workbook
-- csvcleaner - normalize a CSV file by column and row including trimming spaces and removing comments
-- csvcols - a tool for formatting command line arguments into CSV row of columns or filtering CSV rows for specific columns
-- csvfind - a tool for filtering a CSV file rows by column
-- csvjoin - a tool to join two CSV files on common values in designated columns, writes combined CSV rows
-- csvrows - a tool for formatting command line arguments into CSV columns of rows or filtering CSV columns for specific rows
-- jsoncols - a tool for exploring and extracting JSON values into columns
-- jsonjoin - a tool for joining JSON object documents
-- jsonmunge - a tool to transform JSON documents into something else
-- jsonrange - a tool for iterating over JSON objects and arrays (return keys or values)
-- xlsx2csv - a tool for converting Excel Workbooks sheets to CSV files
-- xlsx2json - a tool for converting Excel Workbooks to JSON files
+- csv2json - a tool to take a CSV file and convert it into a JSON array or a list of JSON blobs one per line
+- csv2mdtable - a tool to render CSV as a Github Flavored Markdown table
+- csv2xlsx - a tool to take a CSV file and add it as a sheet to a Excel Workbook
+- csvcleaner - normalize a CSV file by column and row including trimming spaces and removing comments
+- csvcols - a tool for formatting command line arguments into CSV row of columns or filtering CSV rows for specific columns
+- csvfind - a tool for filtering a CSV file rows by column
+- csvjoin - a tool to join two CSV files on common values in designated columns, writes combined CSV rows
+- csvrows - a tool for formatting command line arguments into CSV columns of rows or filtering CSV columns for specific rows
+- jsoncols - a tool for exploring and extracting JSON values into columns
+- jsonjoin - a tool for joining JSON object documents
+- jsonmunge - a tool to transform JSON documents into something else
+- jsonrange - a tool for iterating over JSON objects and arrays (return keys or values)
+- xlsx2csv - a tool for converting Excel Workbooks sheets to CSV files
+- xlsx2json - a tool for converting Excel Workbooks to JSON files
Compiled versions are provided for Linux (amd64), Mac OS X (amd64),
@@ -84,13 +84,13 @@
For scripting
Various utilities for simplifying work on the command line.
-- findfile - find files based on prefix, suffix or contained string
-- finddir - find directories based on prefix, suffix or contained string
-- mergepath - prefix, append, clip path variables
-- range - emit a range of integers (useful for numbered loops in Bash)
-- reldate - display a relative date in YYYY-MM-DD format
-- timefmt - format a time value based on Golang’s time format language
-- urlparse - split a URL into parts
+- findfile - find files based on prefix, suffix or contained string
+- finddir - find directories based on prefix, suffix or contained string
+- mergepath - prefix, append, clip path variables
+- range - emit a range of integers (useful for numbered loops in Bash)
+- reldate - display a relative date in YYYY-MM-DD format
+- timefmt - format a time value based on Golang’s time format language
+- urlparse - split a URL into parts
Compiled versions are provided for Linux (amd64), Mac OS X (amd64),
@@ -100,7 +100,7 @@
For scripting
Installation
-See INSTALL.md for details for installing pre-compiled versions of the programs.
+See INSTALL.md for details for installing pre-compiled versions of the programs.
datatools are go get-able. If you have go v1.8 (or newer) you can install with the command below.