Skip to content

Commit bc4570c

Browse files
committed
commiting to master
1 parent d454780 commit bc4570c

File tree

3 files changed

+106
-97
lines changed

3 files changed

+106
-97
lines changed

docs/csvcols.html

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,60 +20,63 @@
2020
</nav>
2121

2222
<section>
23-
<p>USAGE: csvcols [OPTIONS] ARGS_AS_COLS</p>
23+
<h1>csvcols</h1>
2424

25-
<p>SYNOPSIS</p>
25+
<h2>USAGE</h2>
26+
27+
<pre><code>csvcols [OPTIONS] ARGS_AS_COLS
28+
</code></pre>
29+
30+
<h2>SYNOPSIS</h2>
2631

2732
<p>csvcols converts a set of command line args into columns output in CSV format.
2833
It can also be used to filter input CSV and rendering only the column numbers
2934
listed on the commandline (first column is 1 not 0)</p>
3035

31-
<p>OPTIONS</p>
32-
33-
<pre><code>-col filter CSV input for columns requested
34-
-d set delimiter for conversion
35-
-delimiter set delimiter for conversion
36-
-filter-columns filter CSV input for columns requested
37-
-h display help
38-
-help display help
39-
-i input filename
40-
-input input filename
41-
-l display license
42-
-license display license
43-
-o output filename
44-
-output output filename
45-
-v display version
46-
-version display version
36+
<h2>OPTIONS</h2>
37+
38+
<pre><code> -col filter CSV input for columns requested
39+
-d set delimiter for conversion
40+
-delimiter set delimiter for conversion
41+
-filter-columns filter CSV input for columns requested
42+
-h display help
43+
-help display help
44+
-i input filename
45+
-input input filename
46+
-l display license
47+
-license display license
48+
-o output filename
49+
-output output filename
50+
-v display version
51+
-version display version
4752
</code></pre>
4853

49-
<p>EXAMPLES</p>
54+
<h2>EXAMPLES</h2>
5055

5156
<p>Simple usage of building a CSV file one row at a time.</p>
5257

53-
<pre><code>csvcols one two three &gt; 3col.csv
54-
csvcols 1 2 3 &gt;&gt; 3col.csv
55-
cat 3col.csv
58+
<pre><code class="language-shell"> csvcols one two three &gt; 3col.csv
59+
csvcols 1 2 3 &gt;&gt; 3col.csv
60+
cat 3col.csv
5661
</code></pre>
5762

5863
<p>Example parsing a pipe delimited string into a CSV line</p>
5964

60-
<pre><code>csvcols -d &quot;|&quot; &quot;one|two|three&quot; &gt; 3col.csv
61-
csvcols -delimiter &quot;|&quot; &quot;1|2|3&quot; &gt;&gt; 3col.csv
62-
cat 3col.csv
65+
<pre><code class="language-shell"> csvcols -d &quot;|&quot; &quot;one|two|three&quot; &gt; 3col.csv
66+
csvcols -delimiter &quot;|&quot; &quot;1|2|3&quot; &gt;&gt; 3col.csv
67+
cat 3col.csv
6368
</code></pre>
6469

6570
<p>Filter a 10 column CSV file for columns 1,4,6 (left most column is number zero)</p>
6671

67-
<pre><code>cat 10col.csv | csvcols -col 1 4 6 &gt; 3col.csv
72+
<pre><code class="language-shell"> cat 10col.csv | csvcols -col 1 4 6 &gt; 3col.csv
6873
</code></pre>
6974

7075
<p>Filter a 10 columns CSV file for columns 1,4,6 from input file</p>
7176

72-
<pre><code>csvcols -i 10col.csv -col 1 4 6 &gt; 3col.csv
77+
<pre><code class="language-shell"> csvcols -i 10col.csv -col 1 4 6 &gt; 3col.csv
7378
</code></pre>
7479

75-
<p>csvcols v0.0.8</p>
76-
7780
</section>
7881

7982
<footer>

docs/csvfind.html

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,66 +20,69 @@
2020
</nav>
2121

2222
<section>
23-
<p>USAGE: csvfind [OPTIONS] TEXT_TO_MATCH</p>
23+
<h1>csvfind</h1>
2424

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>
2631

2732
<p>csvfind processes a CSV file as input returning rows that contain the column
2833
with matched text. Columns are count from one instead of zero. Supports
2934
exact match as well as some Levenshtein matching.</p>
3035

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
5661
</code></pre>
5762

58-
<p>EXAMPLES</p>
63+
<h2>EXAMPLES</h2>
5964

6065
<p>Find the rows where the third column matches &ldquo;The Red Book of Westmarch&rdquo; exactly</p>
6166

62-
<pre><code>csvfind -i books.csv -col=2 &quot;The Red Book of Westmarch&quot;
67+
<pre><code class="language-shell"> csvfind -i books.csv -col=2 &quot;The Red Book of Westmarch&quot;
6368
</code></pre>
6469

6570
<p>Find the rows where the third column (colums numbered 0,1,2) matches approximately
6671
&ldquo;The Red Book of Westmarch&rdquo;</p>
6772

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-
&quot;The Red Book of Westmarch&quot;
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+
&quot;The Red Book of Westmarch&quot;
7277
</code></pre>
7378

7479
<p>In this example we&rsquo;ve appended the edit distance to see how close the matches are.</p>
7580

7681
<p>You can also search for phrases in columns.</p>
7782

78-
<pre><code>csvfind -i books.csv -col=2 -contains &quot;Red Book&quot;
83+
<pre><code class="language-shell"> csvfind -i books.csv -col=2 -contains &quot;Red Book&quot;
7984
</code></pre>
8085

81-
<p>csvfind v0.0.8</p>
82-
8386
</section>
8487

8588
<footer>

docs/csvjoin.html

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,55 +20,58 @@
2020
</nav>
2121

2222
<section>
23-
<p>USAGE: csvjoin [OPTIONS] CSV1 CSV2 COL1 COL2</p>
23+
<h1>csvjoin</h1>
2424

25-
<p>SYNOPSIS</p>
25+
<h2>USAGE</h2>
26+
27+
<pre><code>csvjoin [OPTIONS] CSV1 CSV2 COL1 COL2
28+
</code></pre>
29+
30+
<h2>SYNOPSIS</h2>
2631

2732
<p>csvjoin outputs CSV content based on two CSV files with matching column values.
2833
Each CSV input file has a designated column to match on. The values are
2934
compared as strings. Columns are counted from one rather than zero.</p>
3035

31-
<p>OPTIONS</p>
36+
<h2>OPTIONS</h2>
3237

33-
<pre><code>-allow-duplicates allow duplicates when searching for matches
34-
-case-sensitive make a case sensitive match (default is case insensitive)
35-
-col1 column to on join on in first CSV file
36-
-col2 column to on join on in second CSV file
37-
-contains match columns based on csv1/col1 contained in csv2/col2
38-
-csv1 first CSV filename
39-
-csv2 second CSV filename
40-
-delete-cost deletion cost to use when calculating Levenshtein edit distance
41-
-h display help
42-
-help display help
43-
-insert-cost insertion cost to use when calculating Levenshtein edit distance
44-
-l display license
45-
-levenshtein match columns using Levensthein edit distance
46-
-license display license
47-
-max-edit-distance maximum edit distance for match using Levenshtein distance
48-
-o output filename
49-
-output output filename
50-
-stop-words a column delimited list of stop words to ingnore when matching
51-
-substitute-cost substitution cost to use when calculating Levenshtein edit distance
52-
-trim-spaces trim spaces around cell values before comparing
53-
-v display version
54-
-verbose output processing count to stderr
55-
-version display version
38+
<pre><code> -allow-duplicates allow duplicates when searching for matches
39+
-case-sensitive make a case sensitive match (default is case insensitive)
40+
-col1 column to on join on in first CSV file
41+
-col2 column to on join on in second CSV file
42+
-contains match columns based on csv1/col1 contained in csv2/col2
43+
-csv1 first CSV filename
44+
-csv2 second CSV filename
45+
-delete-cost deletion cost to use when calculating Levenshtein edit distance
46+
-h display help
47+
-help display help
48+
-insert-cost insertion cost to use when calculating Levenshtein edit distance
49+
-l display license
50+
-levenshtein match columns using Levensthein edit distance
51+
-license display license
52+
-max-edit-distance maximum edit distance for match using Levenshtein distance
53+
-o output filename
54+
-output output filename
55+
-stop-words a column delimited list of stop words to ingnore when matching
56+
-substitute-cost substitution cost to use when calculating Levenshtein edit distance
57+
-trim-spaces trim spaces around cell values before comparing
58+
-v display version
59+
-verbose output processing count to stderr
60+
-version display version
5661
</code></pre>
5762

58-
<p>EXAMPLES</p>
63+
<h2>EXAMPLES</h2>
5964

6065
<p>Simple usage of building a merged CSV file from data1.csv
6166
and data2.csv where column 1 in data1.csv matches the value in
6267
column 3 of data2.csv with the results being written to
6368
merged-data.csv..</p>
6469

65-
<pre><code>csvjoin -csv1=data1.csv -col1=2 \
66-
-csv2=data2.csv -col2=4 \
67-
-output=merged-data.csv
70+
<pre><code class="language-shell"> csvjoin -csv1=data1.csv -col1=2 \
71+
-csv2=data2.csv -col2=4 \
72+
-output=merged-data.csv
6873
</code></pre>
6974

70-
<p>csvjoin v0.0.8</p>
71-
7275
</section>
7376

7477
<footer>

0 commit comments

Comments
 (0)