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