|
| 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="./">README</a></li> |
| 16 | + <li><a href="LICENSE">LICENSE</a></li> |
| 17 | + <li><a href="INSTALL.html">INSTALL</a></li> |
| 18 | + <li><a href="user-manual.html">User Manual</a></li> |
| 19 | + <li><a href="how-to/">Tutorials</a></li> |
| 20 | + <li><a href="search.html">Search Docs</a></li> |
| 21 | + <li><a href="about.html">About</a></li> |
| 22 | + <li><a href="https://github.com/caltechlibrary/datatools">GitHub</a></li> |
| 23 | +</ul> |
| 24 | +</nav> |
| 25 | + |
| 26 | +<section> |
| 27 | +<h1 id="installation">Installation</h1> |
| 28 | +<p><em>datatools</em> is a collection of command line programs run from |
| 29 | +a shell like Bash.</p> |
| 30 | +<h2 id="quick-install-using-curl-or-irm">Quick install using curl or |
| 31 | +irm</h2> |
| 32 | +<p>The following experimental installer should work for macOS and Linux |
| 33 | +(e.g. Debian, Ubuntu, Raspberry Pi OS)</p> |
| 34 | +<p>Copy and run the following command in your shell (e.g. Terminal)</p> |
| 35 | +<pre><code>curl https://caltechlibrary.github.io/datatools/installer.sh | sh</code></pre> |
| 36 | +<p>On Windows use the Powershell script run with</p> |
| 37 | +<pre><code>irm https://caltechlibrary.github.io/datatools/installer.ps1 | iex</code></pre> |
| 38 | +<p>If you wish to install a specific version then you can set the |
| 39 | +<code>PKG_VERSION</code> environment variable before using the curl or |
| 40 | +irm comments above.</p> |
| 41 | +<p>On Linux, macOS</p> |
| 42 | +<pre><code>export PKG_VERSION="1.2.9" |
| 43 | +curl https://caltechlibrary.github.io/datatools/installer.sh | sh</code></pre> |
| 44 | +<p>or for Windows</p> |
| 45 | +<pre><code>$env:PKG_VERSION = '1.2.9' |
| 46 | +irm https://caltechlibrary.github.io/datatools/installer.ps1 | iex</code></pre> |
| 47 | +<h2 id="compiled-version">Compiled version</h2> |
| 48 | +<p>This is generalized instructions for a release.</p> |
| 49 | +<p>Compiled versions are available for Mac OS X (Intel and M1 processor, |
| 50 | +macos-x86_64 and macOS-arm64), Linux (Intel process, Linux-x86_64), |
| 51 | +Windows (Intel and arm64 processor, windows-x86_64 and Windows-arm64) |
| 52 | +and Rapsberry Pi (arm7 processor, RaspberryPiOS-arm7)</p> |
| 53 | +<p>VERSION_NUMBER is a <a href="http://semver.org/">symantic version |
| 54 | +number</a> (e.g. v0.1.2)</p> |
| 55 | +<p>For all the released version go to the project page on Github and |
| 56 | +click latest release</p> |
| 57 | +<blockquote> |
| 58 | +<p>https://github.com/caltechlibrary/datatools/releases/latest</p> |
| 59 | +</blockquote> |
| 60 | +<table> |
| 61 | +<thead> |
| 62 | +<tr class="header"> |
| 63 | +<th>Platform</th> |
| 64 | +<th>Zip Filename</th> |
| 65 | +</tr> |
| 66 | +</thead> |
| 67 | +<tbody> |
| 68 | +<tr class="odd"> |
| 69 | +<td>Windows</td> |
| 70 | +<td>datatools-VERSION_NUMBER-Windows-x86_64.zip</td> |
| 71 | +</tr> |
| 72 | +<tr class="even"> |
| 73 | +<td>Windows</td> |
| 74 | +<td>datatools-VERSION_NUMBER-Windows-arm64.zip</td> |
| 75 | +</tr> |
| 76 | +<tr class="odd"> |
| 77 | +<td>Mac OS X</td> |
| 78 | +<td>datatools-VERSION_NUMBER-macOS-x86_64.zip</td> |
| 79 | +</tr> |
| 80 | +<tr class="even"> |
| 81 | +<td>Mac OS X</td> |
| 82 | +<td>datatools-VERSION_NUMBER-macOS-arm64.zip</td> |
| 83 | +</tr> |
| 84 | +<tr class="odd"> |
| 85 | +<td>Linux/Intel</td> |
| 86 | +<td>datatools-VERSION_NUMBER-Linux-x86_64.zip</td> |
| 87 | +</tr> |
| 88 | +<tr class="even"> |
| 89 | +<td>Linux/ARM 64</td> |
| 90 | +<td>datatools-VERSION_NUMBER-Linux-aarch64.zip</td> |
| 91 | +</tr> |
| 92 | +<tr class="odd"> |
| 93 | +<td>Raspbery Pi OS</td> |
| 94 | +<td>datatools-VERSION_NUMBER-RaspberryPiOS-arm7.zip</td> |
| 95 | +</tr> |
| 96 | +</tbody> |
| 97 | +</table> |
| 98 | +<h2 id="the-basic-recipe">The basic recipe</h2> |
| 99 | +<ul> |
| 100 | +<li>Find the Zip file listed matching the architecture you’re running |
| 101 | +and download it |
| 102 | +<ul> |
| 103 | +<li>(e.g. if you’re on a Windows 10 laptop/Surface with a Intel style |
| 104 | +CPU you’d choose the Zip file with “windows-x86_64” in the name).</li> |
| 105 | +</ul></li> |
| 106 | +<li>Download the zip file and unzip the file.<br /> |
| 107 | +</li> |
| 108 | +<li>Copy the contents of the folder named “bin” to a folder that is in |
| 109 | +your path |
| 110 | +<ul> |
| 111 | +<li>(e.g. “$HOME/bin” is common).</li> |
| 112 | +</ul></li> |
| 113 | +<li>Adjust your PATH if needed |
| 114 | +<ul> |
| 115 | +<li>(e.g. export PATH=“<span |
| 116 | +class="math inline"><em>H</em><em>O</em><em>M</em><em>E</em>/<em>b</em><em>i</em><em>n</em>:</span>PATH”)</li> |
| 117 | +</ul></li> |
| 118 | +<li>Test</li> |
| 119 | +</ul> |
| 120 | +<h3 id="mac-os">Mac OS</h3> |
| 121 | +<ol type="1"> |
| 122 | +<li>Download the zip file</li> |
| 123 | +<li>Unzip the zip file</li> |
| 124 | +<li>Copy the executables to $HOME/bin (or a folder in your path)</li> |
| 125 | +<li>Make sure the new location in in our path</li> |
| 126 | +<li>Test</li> |
| 127 | +</ol> |
| 128 | +<p>Here’s an example of the commands run in the Terminal App after |
| 129 | +downloading the zip file.</p> |
| 130 | +<h4 id="intel-x86_64-hardware">Intel (x86_64) Hardware</h4> |
| 131 | +<pre class="shell"><code> cd Downloads/ |
| 132 | + unzip datatools-*-macos-x86_64.zip |
| 133 | + mkdir -p $HOME/bin |
| 134 | + mv -v bin/* $HOME/bin/ |
| 135 | + export PATH=$HOME/bin:$PATH |
| 136 | + csvfind -version</code></pre> |
| 137 | +<h4 id="arm64-arm64-hardware">ARM64 (arm64) Hardware</h4> |
| 138 | +<pre class="shell"><code> cd Downloads/ |
| 139 | + unzip datatools-*-macos-arm64.zip |
| 140 | + mkdir -p $HOME/bin |
| 141 | + mv -v bin/* $HOME/bin/ |
| 142 | + export PATH=$HOME/bin:$PATH |
| 143 | + csvfind -version</code></pre> |
| 144 | +<h3 id="windows">Windows</h3> |
| 145 | +<p>(Assumes you’re working from Bash as provided by Linux Subsystem for |
| 146 | +Windows)</p> |
| 147 | +<ol type="1"> |
| 148 | +<li>Download the zip file</li> |
| 149 | +<li>Unzip the zip file</li> |
| 150 | +<li>Copy the executables to $HOME/bin (or a folder in your path)</li> |
| 151 | +<li>Test</li> |
| 152 | +</ol> |
| 153 | +<p>Here’s an example of the commands run in from the Bash shell on |
| 154 | +Windows 10 after downloading the zip file.</p> |
| 155 | +<h4 id="intel-x86_64-hardware-1">Intel (x86_64) Hardware</h4> |
| 156 | +<pre class="shell"><code> cd Downloads/ |
| 157 | + unzip datatools-*-windows-x86_64.zip |
| 158 | + mkdir -p $HOME/bin |
| 159 | + mv -v bin/* $HOME/bin/ |
| 160 | + export PATH=$HOME/bin:$PATH |
| 161 | + csvfind -version</code></pre> |
| 162 | +<h4 id="arm64-arm64-hardware-1">ARM64 (arm64) Hardware</h4> |
| 163 | +<pre class="shell"><code> cd Downloads/ |
| 164 | + unzip datatools-*-windows-arm64.zip |
| 165 | + mkdir -p $HOME/bin |
| 166 | + mv -v bin/* $HOME/bin/ |
| 167 | + export PATH=$HOME/bin:$PATH |
| 168 | + csvfind -version</code></pre> |
| 169 | +<h3 id="linux">Linux</h3> |
| 170 | +<ol type="1"> |
| 171 | +<li>Download the zip file</li> |
| 172 | +<li>Unzip the zip file</li> |
| 173 | +<li>Copy the executables to $HOME/bin (or a folder in your path)</li> |
| 174 | +<li>Test</li> |
| 175 | +</ol> |
| 176 | +<p>Here’s an example of the commands run in from the Bash shell after |
| 177 | +downloading the zip file.</p> |
| 178 | +<pre class="shell"><code> cd Downloads/ |
| 179 | + unzip datatools-*-linux-x86_64.zip |
| 180 | + mkdir -p $HOME/bin |
| 181 | + cp -v bin/* $HOME/bin/ |
| 182 | + export PATH=$HOME/bin:$PATH |
| 183 | + csvfind -version</code></pre> |
| 184 | +<h3 id="raspberry-pi">Raspberry Pi</h3> |
| 185 | +<p>Released version is for a Raspberry Pi 2 or later use (i.e. requires |
| 186 | +ARM 7 support).</p> |
| 187 | +<ol type="1"> |
| 188 | +<li>Download the zip file</li> |
| 189 | +<li>Unzip the zip file</li> |
| 190 | +<li>Copy the executables to $HOME/bin (or a folder in your path)</li> |
| 191 | +<li>Test</li> |
| 192 | +</ol> |
| 193 | +<p>Here’s an example of the commands run in from the Bash shell after |
| 194 | +downloading the zip file.</p> |
| 195 | +<pre class="shell"><code> cd Downloads/ |
| 196 | + unzip datatools-*-raspberry_pi_os-arm7.zip |
| 197 | + mkdir -p $HOME/bin |
| 198 | + cp -v bin/* $HOME/bin/ |
| 199 | + export PATH=$HOME/bin:$PATH |
| 200 | + csvfind -version</code></pre> |
| 201 | +<h2 id="compiling-from-source">Compiling from source</h2> |
| 202 | +<p><em>datatools</em> is “go gettable” if you have previously gotten |
| 203 | +xlsx v1.0.5 package from <a |
| 204 | +href="https://github.com/tealeg/xlsx">github.com/tealeg/xlsx</a>. The |
| 205 | +datatools package does not support versions v2.x and greater of xlsx. |
| 206 | +Below are the steps I use today with “go get” command to download the |
| 207 | +dependant packages as well as <em>datatools</em>’s source code.</p> |
| 208 | +<p>Setting up the right version of xlsx for datatools</p> |
| 209 | +<pre class="shell"><code> cd |
| 210 | + go get github.com/tealeg/xlsx |
| 211 | + cd src/github.com/tealeg |
| 212 | + git checkout v1.0.5 |
| 213 | + cd</code></pre> |
| 214 | +<p>Using <code>go get</code> to install datatools using v1.0.5 of |
| 215 | +xlsx.</p> |
| 216 | +<pre><code> go get github.com/caltechlibrary/datatools/...</code></pre> |
| 217 | +<p>Or clone the repository and then compile</p> |
| 218 | +<pre class="shell"><code> cd |
| 219 | + git clone https://github.com/caltechlibrary/datatools src/github.com/caltechlibrary/datatools |
| 220 | + cd src/github.com/caltechlibrary/datatools |
| 221 | + make |
| 222 | + make test |
| 223 | + make install</code></pre> |
| 224 | +</section> |
| 225 | + |
| 226 | +<footer> |
| 227 | +<span><h1><A href="http://caltech.edu">Caltech</a></h1></span> |
| 228 | +<span>© 2023 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span> |
| 229 | +<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address> |
| 230 | +<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span> |
| 231 | +<span><a href=" mailto:[email protected]" >Email Us </a></span> |
| 232 | +<a class="cl-hide" href="sitemap.xml">Site Map</a> |
| 233 | +</footer> |
| 234 | +</body> |
| 235 | +</html> |
0 commit comments