Skip to content

Commit ac7cf8b

Browse files
committed
updating docs
1 parent d63e2da commit ac7cf8b

File tree

5 files changed

+98
-3
lines changed

5 files changed

+98
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ shelltools which are utilities useful for shell scripting.
1616
+ [jsonmunge](docs/jsonmunge.html) - a tool to transform JSON documents into something else
1717
+ [jsonrange](docs/jsonrange.html) - a tool for iterating for JSON maps and arrays
1818
+ [vcard2json](docs/vcard2json.html) - an experimental tool to convert vCards to JSON
19-
+ [xlsx2json](docs/xlsx2json.html) - a tool for converting Excel Workbooks to JSON files
2019
+ [xlsx2csv](docs/xlsx2csv.html) - a tool for converting Excel Workbooks sheets to a CSV file(s)
20+
+ [xlsx2json](docs/xlsx2json.html) - a tool for converting Excel Workbooks to JSON files
2121

2222

2323
Compiled versions are provided for Linux (amd64), Mac OS X (amd64),

docs/csvrows.html

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Caltech Library's Digital Library Development Sandbox</title>
5+
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
6+
<link rel="stylesheet" href="/css/site.css">
7+
</head>
8+
<body>
9+
<header>
10+
<a href="http://library.caltech.edu"><img src="/assets/liblogo.gif" alt="Caltech Library logo"></a>
11+
</header>
12+
<nav>
13+
<ul>
14+
<li><a href="/">Home</a></li>
15+
<li><a href="../">up</a></li>
16+
<li><a href="./">Documentation</a></li>
17+
<li><a href="../how-to/">How To &hellip;</a></li>
18+
</ul>
19+
20+
</nav>
21+
22+
<section>
23+
<h1>USAGE</h1>
24+
25+
<h2>csvrows [OPTIONS] [ARGS_AS_ROW_VALUES]</h2>
26+
27+
<h2>SYNOPSIS</h2>
28+
29+
<p>csvrows converts a set of command line args into rows of CSV formated output.
30+
It can also be used to filter or list specific rows of CSV input
31+
The first row is 1 not 0. Often row 1 is the header row and %!s(MISSING) makes it
32+
easy to output only the data rows.</p>
33+
34+
<h2>OPTIONS</h2>
35+
36+
<pre><code>-d set delimiter character
37+
-delimiter set delimiter character
38+
-h display help
39+
-header display the header row (alias for '-rows 1')
40+
-help display help
41+
-i input filename
42+
-input input filename
43+
-l display license
44+
-license display license
45+
-o output filename
46+
-output output filename
47+
-row output specified rows in order (e.g. -row 1,5,2:4))
48+
-rows output specified rows in order (e.g. -rows 1,5,2:4))
49+
-skip-header-row skip the header row (alias for -row 2:
50+
-v display version
51+
-version display version
52+
</code></pre>
53+
54+
<h2>EXAMPLES</h2>
55+
56+
<p>Simple usage of building a CSV file one rows at a time.</p>
57+
58+
<pre><code class="language-shell"> csvrows &quot;First,Second,Third&quot; &quot;one,two,three&quot; &gt; 4rows.csv
59+
csvrows &quot;ein,zwei,drei&quot; &quot;1,2,3&quot; &gt;&gt; 4rows.csv
60+
cat 4row.csv
61+
</code></pre>
62+
63+
<p>Example parsing a pipe delimited string into a CSV line</p>
64+
65+
<pre><code class="language-shell"> csvrows -d &quot;|&quot; &quot;First,Second,Third|one,two,three&quot; &gt; 4rows.csv
66+
csvrows -delimiter &quot;|&quot; &quot;ein,zwei,drei|1,2,3&quot; &gt;&gt; 4rows.csv
67+
cat 4rows.csv
68+
</code></pre>
69+
70+
<p>Filter a 10 row CSV file for rows 1,4,6 (top most row is one)</p>
71+
72+
<pre><code class="language-shell"> cat 10row.csv | csvrows -row 1,4,6 &gt; 3rows.csv
73+
</code></pre>
74+
75+
<p>Filter a 10 row CSV file for rows 1,4,6 from file named &ldquo;10row.csv&rdquo;</p>
76+
77+
<pre><code class="language-shell"> csvrows -i 10row.csv -row 1,4,6 &gt; 3rows.csv
78+
</code></pre>
79+
80+
<p>csvrows v0.0.14</p>
81+
82+
</section>
83+
84+
<footer>
85+
<span><h1><A href="http://caltech.edu">Caltech</a></h1></span>
86+
<span>&copy; 2017 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
87+
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
88+
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
89+
<span><a href="mailto:[email protected]">Email Us</a></span>
90+
<a class="cl-hide" href="sitemap.xml">Site Map</a>
91+
</footer>
92+
</body>
93+
</html>

docs/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ <h1>datatools command help</h1>
2727
<li><a href="csv2mdtable.html">csv2mdtable</a></li>
2828
<li><a href="csv2xlsx.html">csv2xlsx</a></li>
2929
<li><a href="csvcols.html">csvcols</a></li>
30+
<li><a href="csvrows.html">csvrows</a></li>
3031
<li><a href="csvfind.html">csvfind</a></li>
3132
<li><a href="csvjoin.html">csvjoin</a></li>
3233
<li><a href="finddir.html">finddir</a></li>

docs/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
+ [csv2mdtable](csv2mdtable.html)
66
+ [csv2xlsx](csv2xlsx.html)
77
+ [csvcols](csvcols.html)
8+
+ [csvrows](csvrows.html)
89
+ [csvfind](csvfind.html)
910
+ [csvjoin](csvjoin.html)
1011
+ [finddir](finddir.html)

mk-website.bash

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ cat <<EOF2 >docs/index.md
6161
EOF2
6262

6363
# Generate the index for command docuumentation pages
64-
for FNAME in csv2json csv2mdtable csv2xlsx csvcols csvfind csvjoin finddir findfile index jsoncols jsonmunge jsonjoin jsonrange mergepath range reldate timefmt urlparse vcard2json xlsx2csv xlsx2json; do
64+
for FNAME in csv2json csv2mdtable csv2xlsx csvcols csvrows csvfind csvjoin finddir findfile index jsoncols jsonmunge jsonjoin jsonrange mergepath range reldate timefmt urlparse vcard2json xlsx2csv xlsx2json; do
6565
echo "+ [$FNAME](${FNAME}.html)"
6666
done >>docs/index.md
6767
git add docs/index.md
6868

6969
# Generate the individual command docuumentation pages
70-
for FNAME in csv2json csv2mdtable csv2xlsx csvcols csvfind csvjoin finddir findfile index jsoncols jsonmunge jsonjoin jsonrange mergepath range reldate timefmt urlparse vcard2json xlsx2csv xlsx2json; do
70+
for FNAME in csv2json csv2mdtable csv2xlsx csvcols csvrows csvfind csvjoin finddir findfile index jsoncols jsonmunge jsonjoin jsonrange mergepath range reldate timefmt urlparse vcard2json xlsx2csv xlsx2json; do
7171
echo "Generating docs/$FNAME.html"
7272
MakePage docs/nav.md "docs/$FNAME.md" "docs/$FNAME.html"
7373
done

0 commit comments

Comments
 (0)