|
20 | 20 | </nav> |
21 | 21 |
|
22 | 22 | <section> |
23 | | -<p>USAGE: csvfind [OPTIONS] TEXT_TO_MATCH</p> |
| 23 | +<h1>csvfind</h1> |
24 | 24 |
|
25 | | -<p>SYNOPSIS</p> |
| 25 | +<h2>USAGE</h2> |
| 26 | + |
| 27 | +<pre><code>csvfind [OPTIONS] TEXT_TO_MATCH |
| 28 | +</code></pre> |
| 29 | + |
| 30 | +<h2>SYNOPSIS</h2> |
26 | 31 |
|
27 | 32 | <p>csvfind processes a CSV file as input returning rows that contain the column |
28 | 33 | with matched text. Columns are count from one instead of zero. Supports |
29 | 34 | exact match as well as some Levenshtein matching.</p> |
30 | 35 |
|
31 | | -<p>OPTIONS</p> |
32 | | - |
33 | | -<pre><code>-allow-duplicates allow duplicates when searching for matches |
34 | | --append-edit-distance append column with edit distance found (useful for tuning levenshtein) |
35 | | --case-sensitive perform a case sensitive match (default is false) |
36 | | --col column to search for match in the CSV file |
37 | | --contains use contains phrase for matching |
38 | | --delete-cost set the delete cost to use for levenshtein matching |
39 | | --h display help |
40 | | --help display help |
41 | | --i input filename |
42 | | --input input filename |
43 | | --insert-cost set the insert cost to use for levenshtein matching |
44 | | --l display license |
45 | | --levenshtein use levenshtein matching |
46 | | --license display license |
47 | | --max-edit-distance set the edit distance thresh hold for match, default 0 |
48 | | --o output filename |
49 | | --output output filename |
50 | | --skip-header-row skip the header row |
51 | | --stop-words use the colon delimited list of stop words |
52 | | --substitute-cost set the substitution cost to use for levenshtein matching |
53 | | --trim-spaces trim spaces around cell values before comparing |
54 | | --v display version |
55 | | --version display version |
| 36 | +<h2>OPTIONS</h2> |
| 37 | + |
| 38 | +<pre><code> -allow-duplicates allow duplicates when searching for matches |
| 39 | + -append-edit-distance append column with edit distance found (useful for tuning levenshtein) |
| 40 | + -case-sensitive perform a case sensitive match (default is false) |
| 41 | + -col column to search for match in the CSV file |
| 42 | + -contains use contains phrase for matching |
| 43 | + -delete-cost set the delete cost to use for levenshtein matching |
| 44 | + -h display help |
| 45 | + -help display help |
| 46 | + -i input filename |
| 47 | + -input input filename |
| 48 | + -insert-cost set the insert cost to use for levenshtein matching |
| 49 | + -l display license |
| 50 | + -levenshtein use levenshtein matching |
| 51 | + -license display license |
| 52 | + -max-edit-distance set the edit distance thresh hold for match, default 0 |
| 53 | + -o output filename |
| 54 | + -output output filename |
| 55 | + -skip-header-row skip the header row |
| 56 | + -stop-words use the colon delimited list of stop words |
| 57 | + -substitute-cost set the substitution cost to use for levenshtein matching |
| 58 | + -trim-spaces trim spaces around cell values before comparing |
| 59 | + -v display version |
| 60 | + -version display version |
56 | 61 | </code></pre> |
57 | 62 |
|
58 | | -<p>EXAMPLES</p> |
| 63 | +<h2>EXAMPLES</h2> |
59 | 64 |
|
60 | 65 | <p>Find the rows where the third column matches “The Red Book of Westmarch” exactly</p> |
61 | 66 |
|
62 | | -<pre><code>csvfind -i books.csv -col=2 "The Red Book of Westmarch" |
| 67 | +<pre><code class="language-shell"> csvfind -i books.csv -col=2 "The Red Book of Westmarch" |
63 | 68 | </code></pre> |
64 | 69 |
|
65 | 70 | <p>Find the rows where the third column (colums numbered 0,1,2) matches approximately |
66 | 71 | “The Red Book of Westmarch”</p> |
67 | 72 |
|
68 | | -<pre><code>csvfind -i books.csv -col=2 -levenshtein \ |
69 | | - -insert-cost=1 -delete-cost=1 -substitute-cost=3 \ |
70 | | - -max-edit-distance=50 -append-edit-distance \ |
71 | | - "The Red Book of Westmarch" |
| 73 | +<pre><code class="language-shell"> csvfind -i books.csv -col=2 -levenshtein \ |
| 74 | + -insert-cost=1 -delete-cost=1 -substitute-cost=3 \ |
| 75 | + -max-edit-distance=50 -append-edit-distance \ |
| 76 | + "The Red Book of Westmarch" |
72 | 77 | </code></pre> |
73 | 78 |
|
74 | 79 | <p>In this example we’ve appended the edit distance to see how close the matches are.</p> |
75 | 80 |
|
76 | 81 | <p>You can also search for phrases in columns.</p> |
77 | 82 |
|
78 | | -<pre><code>csvfind -i books.csv -col=2 -contains "Red Book" |
| 83 | +<pre><code class="language-shell"> csvfind -i books.csv -col=2 -contains "Red Book" |
79 | 84 | </code></pre> |
80 | 85 |
|
81 | | -<p>csvfind v0.0.8</p> |
82 | | - |
83 | 86 | </section> |
84 | 87 |
|
85 | 88 | <footer> |
|
0 commit comments