-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
381 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Caltech Library's Digital Library Development Sandbox</title> | ||
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> | ||
<link rel="stylesheet" href="/css/site.css"> | ||
</head> | ||
<body> | ||
<header> | ||
<a href="http://library.caltech.edu"><img src="/assets/liblogo.gif" alt="Caltech Library logo"></a> | ||
</header> | ||
<nav> | ||
<ul> | ||
<li><a href="/">Home</a></li> | ||
<li><a href="./">README</a></li> | ||
<li><a href="license.html">LICENSE</a></li> | ||
<li><a href="install.html">INSTALL</a></li> | ||
<li><a href="docs/">Documentation</a></li> | ||
<li><a href="how-to/">How To</a></li> | ||
<li><a href="https://github.com/caltechlibrary/datatools">Github</a></li> | ||
</ul> | ||
|
||
</nav> | ||
|
||
<section> | ||
<h1>Action Items</h1> | ||
|
||
<h2>Bug</h2> | ||
|
||
<h2>Next</h2> | ||
|
||
<ul> | ||
<li>[ ] csvrows would output a range of rows (e.g. [2:] would be all rows but the first row)</li> | ||
<li>[ ] csv utilities to support integer ranges notation for columns and rows references, E.g. “1,3:4,7,10:” or all</li> | ||
</ul> | ||
|
||
<h2>Someday, Maybe</h2> | ||
|
||
<ul> | ||
<li>[ ] finddir should have an option to exclude directories (e.g. exclude .git directories from a listing)</li> | ||
<li>[ ] textscraper - a tool for select out text and storing it as a JSON field value, sort grep plus sed cleanup and semi-structured text (e.g. webpage) | ||
|
||
<ul> | ||
<li>look at how cut, sed, grep are commonly used in my scripts and merge that functionality into a single tool</li> | ||
</ul></li> | ||
<li>[ ] csvcols, csvrows should have a length option to give you a number of columns or rows respectively</li> | ||
<li>[ ] csvcols, csvrows should have a filter option to filter to support filting output conditionally</li> | ||
<li>[ ] csvsort should allow a multi-column sort respecting column headings | ||
|
||
<ul> | ||
<li>plus column number would be ascending by that column</li> | ||
<li>minos column number would be descending by that column</li> | ||
<li>sort would be read from left to right</li> | ||
<li>it would be good to include support for column names and not just column numbers to describe the sort</li> | ||
</ul></li> | ||
<li>[ ] jsonmodify takes a JSON document, a dotpath and value then creates/updates the dotpath in the JSON document with the new value | ||
|
||
<ul> | ||
<li>”(delete DOTPATH)” would remove the property described by the dotpath</li> | ||
<li>”(update DOTPATH NEW_VALUE)” would replace the property described by the dotpath with a new value (value can be a string, number, or JSON)</li> | ||
<li>”(create” DOTPATH NEW_VALUE)” would add a new property at the described dotpath with a new value (value can be a string, number, or JSON)</li> | ||
<li>”(join DOTH_PATH SEP)” combines JSON array elements into a string version using separator</li> | ||
<li>”(concat DOTPATH1 DOTPATH2… SEP)” combines values into a concatenated string, it takes one or more dotpath values (must be string or number) and return them as a concatenated value (concat .last_name .first_name “, “) would return a last name comma first name string.</li> | ||
<li>”(split DOTH_PATH SEP)” turns a string into an array of strings using separator</li> | ||
</ul></li> | ||
<li>[ ] csvcols, csvrows should have a filter mechanism should provide a mechanism to filter by column or row | ||
|
||
<ul> | ||
<li>using a prefix notation (e.g. ‘(and (eq (join (cols (colNo “Last Name”) (colNo “First Name”)) “, “) “Doiel, R. S.”) (gt (cols 4) “2017-06-12”))’)</li> | ||
</ul></li> | ||
<li>[ ] csvfind, csvjoin should have an inverted match operation</li> | ||
<li>[ ] a range should accept the word “all” as well as comma delimited list of rows and ranges</li> | ||
<li>[ ] Add -uuid and -skip-header-row options constistantly to all csv tools | ||
|
||
<ul> | ||
<li>[ ] csvcols</li> | ||
</ul></li> | ||
<li>[ ] unify the options vocabulary to work the same between each cli | ||
|
||
<ul> | ||
<li>Need a common approach to column ranges in csvcols, csvfind, csvjoin</li> | ||
<li>csv2json, csv2mdtable, csv2xlsx should accept a column and row range option for output</li> | ||
</ul></li> | ||
<li>[ ] csvfind add filter by row number (helpful when combined with csvcols for snapshotting the middle of a table)</li> | ||
<li>[ ] csv2json should have an option that will include a row number in JSON blob output</li> | ||
<li>[ ] csv2json should have the options to normalize property names in JSON objects | ||
|
||
<ul> | ||
<li>camel case</li> | ||
<li>snake case</li> | ||
<li>lower case/upper case</li> | ||
<li>space to underscores</li> | ||
<li>strip punctuation</li> | ||
<li>rename keys</li> | ||
</ul></li> | ||
<li>[ ] csvrotate would take a CSV file as import and output columns as rows</li> | ||
<li>[ ] smartcat would function like cat but with support for ranges of lines (e.g. show me last 20 lines: smartcat -start=0 -end=“-20” file.txt; cat starting with 10th line: smartcat -start=10 file.txt) | ||
|
||
<ul> | ||
<li>[ ] allow prefix line number with a specific delimiter (E.g. comma would let you cat a CSV file adding row numbers as first column)</li> | ||
<li>[ ] show lines with prefix, suffix, containing or regxp</li> | ||
<li>[ ] show lines without prefix, suffix, containing or regexp</li> | ||
</ul></li> | ||
</ul> | ||
|
||
<h2>Completed</h2> | ||
|
||
<ul> | ||
<li>[x] csvcols -col option should not be a boolean, it should take a range like other csv cli</li> | ||
<li>[x] utilities should use starting index of 1 instead of zero as humans refer to column 1 when intending to work on the first column</li> | ||
<li>[x] for all cli the -delimiter option should support special characters like \t, \n, \r</li> | ||
<li>[x] csvfind would accept CSV input from stdin and output rows with matching column values | ||
|
||
<ul> | ||
<li>E.g. <code>cat file1.csv | csvfind -levenshtein -stop-words="the:a:of" -col=1 "This Red Book of West March"</code></li> | ||
<li>E.g. <code>cat file1.csv | csvfind -inverted -levenstein -stop-words="the:a:of" -col=1 "This Red Book of West March"</code></li> | ||
<li>E.g. <code>cat file1.csv | csvfind -contains -col=1 "Red Book"</code></li> | ||
</ul></li> | ||
<li>[x] csvjoin should have option for fuzzy match on columns (e.g. comparing titles)</li> | ||
</ul> | ||
|
||
</section> | ||
|
||
<footer> | ||
<span><h1><A href="http://caltech.edu">Caltech</a></h1></span> | ||
<span>© 2017 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span> | ||
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address> | ||
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span> | ||
<span><a href="mailto:[email protected]">Email Us</a></span> | ||
<a class="cl-hide" href="sitemap.xml">Site Map</a> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ import ( | |
) | ||
|
||
const ( | ||
Version = `v0.0.16-dev` | ||
Version = `v0.0.16` | ||
|
||
LicenseText = ` | ||
%s %s | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,4 @@ Convert data1.csv to JSON blobs, one line per blob | |
``` | ||
|
||
|
||
csv2json v0.0.15 | ||
csv2json v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ Convert data1.csv to data1.md using options. | |
``` | ||
|
||
|
||
csv2mdtable v0.0.15 | ||
csv2mdtable v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,4 @@ Filter a 10 columns CSV file for columns 1,4,6 from file named "10col.csv" | |
``` | ||
|
||
|
||
csvcols v0.0.15 | ||
csvcols v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,4 @@ You can also search for phrases in columns. | |
``` | ||
|
||
|
||
csvfind v0.0.15 | ||
csvfind v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,4 @@ merged-data.csv.. | |
-output=merged-data.csv | ||
``` | ||
|
||
csvjoin v0.0.15 | ||
csvjoin v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,4 +60,4 @@ Filter a 10 row CSV file for rows 1,4,6 from file named "10row.csv" | |
``` | ||
|
||
|
||
csvrows v0.0.15 | ||
csvrows v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ <h2>EXAMPLES</h2> | |
<pre><code class="language-csv"> "Doe, Jane",[email protected],42 | ||
</code></pre> | ||
|
||
<p>jsoncols v0.0.15</p> | ||
<p>jsoncols v0.0.16</p> | ||
|
||
</section> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,4 @@ Would yield | |
``` | ||
|
||
|
||
jsoncols v0.0.15 | ||
jsoncols v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,4 +149,4 @@ would yield | |
``` | ||
|
||
|
||
jsonjoin v0.0.15 | ||
jsonjoin v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,4 @@ This would yeild | |
``` | ||
|
||
|
||
jsonmunge v0.0.15 | ||
jsonmunge v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,7 +160,7 @@ <h2>EXAMPLES</h2> | |
2 | ||
</code></pre> | ||
|
||
<p>jsonrange v0.0.15</p> | ||
<p>jsonrange v0.0.16</p> | ||
|
||
</section> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,4 +149,4 @@ would yield | |
2 | ||
``` | ||
|
||
jsonrange v0.0.15 | ||
jsonrange v0.0.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.