1313< ul >
1414< li > < a href ="/ "> Home</ a > </ li >
1515< li > < a href ="../ "> up</ a > </ li >
16+ < li > < a href ="./ "> Documentation</ a > </ li >
1617< li > < a href ="csv2json.html "> csv2json</ a > </ li >
1718< li > < a href ="csv2mdtable.html "> csv2mdtable</ a > </ li >
1819< li > < a href ="csv2xlsx.html "> csv2xlsx</ a > </ li >
2829</ nav >
2930
3031< section >
31- < h1 > USAGE</ h1 >
32+ < h1 > csvfind</ h1 >
33+
34+ < h2 > USAGE</ h2 >
3235
3336< pre > < code > csvfind [OPTIONS] TEXT_TO_MATCH
3437</ code > </ pre >
@@ -43,6 +46,7 @@ <h2>OPTIONS</h2>
4346< pre > < code > -append-edit-distance append column with edit distance found (useful for tuning levenshtein)
4447 -case-sensitive perform a case sensitive match (default is false)
4548 -col column to search for match in the CSV file
49+ -contains use contains phrase for matching
4650 -delete-cost set the delete cost to use for levenshtein matching
4751 -h display help
4852 -help display help
@@ -66,19 +70,24 @@ <h2>EXAMPLES</h2>
6670
6771< p > Find the rows where the third column matches “The Red Book of Westmarch” exactly</ p >
6872
69- < pre > < code class ="language-shell "> csvfind -i books.csv -col=2 "The Red Book of Westmarch"
73+ < pre > < code class ="language-shell "> csvfind -i books.csv -col=1 "The Red Book of Westmarch"
7074</ code > </ pre >
7175
72- < p > Find the rows where the third column matches approximately “The Red Book of Westmarch”</ p >
76+ < p > Find the rows where the third column (colums numbered 0,1,2) matches approximately
77+ “The Red Book of Westmarch”</ p >
7378
74- < pre > < code class ="language-shell "> csvfind -i books.csv -col=2 -levenshtein \
79+ < pre > < code class ="language-shell "> csvfind -i books.csv -col=1 -levenshtein \
7580 -insert-cost=1 -delete-cost=1 -substitute-cost=3 \
7681 -max-edit-distance=50 -append-edit-distance \
7782 "The Red Book of Westmarch"
7883</ code > </ pre >
7984
80- < p > In this example all records from the demo books.csv file would be returned with their
81- distance number as the final column.</ p >
85+ < p > In this example we’ve appended the edit distance to see how close the matches are.</ p >
86+
87+ < p > You can also search for phrases in columns.</ p >
88+
89+ < pre > < code class ="language-shell "> csvfind -i books.csv -col=1 -contains "Red Book"
90+ </ code > </ pre >
8291
8392</ section >
8493
0 commit comments