|
25 | 25 | <section> |
26 | 26 | <h1>Installation</h1> |
27 | 27 |
|
| 28 | +<p><em>datatools</em> is a collection of command line programs run from a shell like Bash.</p> |
| 29 | + |
28 | 30 | <h2>Compiled version</h2> |
29 | 31 |
|
30 | | -<p><em>datatools</em> is a collection of command line programs run from a shell like Bash (or Powershell in Windows). If you download the repository a compiled version is in the dist directory. The compiled VERSION_NO matching your computer type and operating system can be copied to a bin directory in your PATH.</p> |
| 32 | +<p>This is generalized instructions for a release.</p> |
| 33 | + |
| 34 | +<p>Compiled versions are available for Mac OS X (amd64 processor, macosx-amd64), Linux (amd64 process, linux-amd64), |
| 35 | +Windows (amd64 processor, windows-amd64) and Rapsberry Pi (arm7 processor, raspbian-arm7)</p> |
| 36 | + |
| 37 | +<p>VERSION_NUMBER is a <a href="http://semver.org/">symantic version number</a> (e.g. v0.1.2)</p> |
| 38 | + |
| 39 | +<p>For all the released version go to the project page on Github and click latest release</p> |
| 40 | + |
| 41 | +<blockquote> |
| 42 | +<p><a href="https://github.com/caltechlibrary/datatools/releases/latest">https://github.com/caltechlibrary/datatools/releases/latest</a></p> |
| 43 | +</blockquote> |
| 44 | + |
| 45 | +<table> |
| 46 | +<thead> |
| 47 | +<tr> |
| 48 | +<th>Platform</th> |
| 49 | +<th>Zip Filename</th> |
| 50 | +</tr> |
| 51 | +</thead> |
| 52 | + |
| 53 | +<tbody> |
| 54 | +<tr> |
| 55 | +<td>Windows</td> |
| 56 | +<td>datatools-VERSION_NUMBER-windows-amd64.zip</td> |
| 57 | +</tr> |
| 58 | + |
| 59 | +<tr> |
| 60 | +<td>Mac OS X</td> |
| 61 | +<td>datatools-VERSION_NUMBER-macosx-amd64.zip</td> |
| 62 | +</tr> |
| 63 | + |
| 64 | +<tr> |
| 65 | +<td>Linux/Intel</td> |
| 66 | +<td>datatools-VERSION_NUMBER-linux-amd64.zip</td> |
| 67 | +</tr> |
| 68 | + |
| 69 | +<tr> |
| 70 | +<td>Raspbery Pi</td> |
| 71 | +<td>datatools-VERSION_NUMBER-raspbian-arm7.zip</td> |
| 72 | +</tr> |
| 73 | +</tbody> |
| 74 | +</table> |
| 75 | + |
| 76 | +<h2>The basic recipe</h2> |
31 | 77 |
|
32 | | -<p>Compiled versions are available for Mac OS X (amd64 processor), Linux (amd64), Windows (amd64) and Rapsberry Pi (both ARM6 and ARM7)</p> |
| 78 | +<ul> |
| 79 | +<li>Find the Zip file listed matching the architecture you’re running and download it |
| 80 | + |
| 81 | +<ul> |
| 82 | +<li>(e.g. if you’re on a Windows 10 laptop/Surface with a amd64 style CPU you’d choose the Zip file with “windows-amd64” in the name).</li> |
| 83 | +</ul></li> |
| 84 | +<li>Download the zip file and unzip the file.<br /></li> |
| 85 | +<li>Copy the contents of the folder named “bin” to a folder that is in your path |
| 86 | + |
| 87 | +<ul> |
| 88 | +<li>(e.g. “$HOME/bin” is common).</li> |
| 89 | +</ul></li> |
| 90 | +<li>Adjust your PATH if needed |
| 91 | + |
| 92 | +<ul> |
| 93 | +<li>(e.g. <code>export PATH="$HOME/bin:$PATH"</code>)</li> |
| 94 | +</ul></li> |
| 95 | +<li>Test</li> |
| 96 | +</ul> |
33 | 97 |
|
34 | 98 | <h3>Mac OS X</h3> |
35 | 99 |
|
36 | 100 | <ol> |
37 | | -<li>Download <strong>datatools-VERSION_NO-release.zip</strong> from <a href="https://github.com/caltechlibrary/datatools/releases/latest">https://github.com/caltechlibrary/datatools/releases/latest</a></li> |
38 | | -<li>Open a finder window, find and unzip <strong>datatools-VERSION_NO-release.zip</strong></li> |
39 | | -<li>Look in the unziped folder and find <em>dist/macosx-amd64/</em></li> |
40 | | -<li>Drag (or copy) <em>jsoncols</em>, <em>jsonrange</em>, etc. to a “bin” directory in your path</li> |
41 | | -<li>Open and “Terminal” and run <code>jsoncols -h</code> to confirm you were successful</li> |
| 101 | +<li>Download the zip file</li> |
| 102 | +<li>Unzip the zip file</li> |
| 103 | +<li>Copy the executables to $HOME/bin (or a folder in your path)</li> |
| 104 | +<li>Make sure the new location in in our path</li> |
| 105 | +<li>Test</li> |
42 | 106 | </ol> |
43 | 107 |
|
| 108 | +<p>Here’s an example of the commands run in the Terminal App after downloading the |
| 109 | +zip file.</p> |
| 110 | + |
| 111 | +<pre><code class="language-shell"> cd Downloads/ |
| 112 | + unzip datatools-*-macosx-amd64.zip |
| 113 | + mkdir -p $HOME/bin |
| 114 | + cp -v bin/* $HOME/bin/ |
| 115 | + export PATH=$HOME/bin:$PATH |
| 116 | + csvfind -version |
| 117 | +</code></pre> |
| 118 | + |
44 | 119 | <h3>Windows</h3> |
45 | 120 |
|
46 | 121 | <ol> |
47 | | -<li>Download <strong>datatools-VERSION_NO-release.zip</strong> from <a href="https://github.com/caltechlibrary/datatools/releases/latest">https://github.com/caltechlibrary/datatools/releases/latest</a></li> |
48 | | -<li>Open the file manager find and unzip <strong>datatools-VERSION_NO-release.zip</strong></li> |
49 | | -<li>Look in the unziped folder and find <em>dist/windows-amd64/</em></li> |
50 | | -<li>Drag (or copy) <em>jsoncols.exe</em>, <em>jsonrange.exe</em>, etc. to a “bin” directory in your path</li> |
51 | | -<li>Open Bash and and run <code>jsoncols -h</code> to confirm you were successful</li> |
| 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>Test</li> |
52 | 126 | </ol> |
53 | 127 |
|
| 128 | +<p>Here’s an example of the commands run in from the Bash shell on Windows 10 after |
| 129 | +downloading the zip file.</p> |
| 130 | + |
| 131 | +<pre><code class="language-shell"> cd Downloads/ |
| 132 | + unzip datatools-*-windows-amd64.zip |
| 133 | + mkdir -p $HOME/bin |
| 134 | + cp -v bin/* $HOME/bin/ |
| 135 | + export PATH=$HOME/bin:$PATH |
| 136 | + csvfind -version |
| 137 | +</code></pre> |
| 138 | + |
54 | 139 | <h3>Linux</h3> |
55 | 140 |
|
56 | 141 | <ol> |
57 | | -<li>Download <strong>datatools-VERSION_NO-release.zip</strong> from <a href="https://github.com/caltechlibrary/datatools/releases/latest">https://github.com/caltechlibrary/datatools/releases/latest</a></li> |
58 | | -<li>Find and unzip <strong>datatools-VERSION_NO-release.zip</strong></li> |
59 | | -<li>In the unziped directory and find for <em>dist/linux-amd64/</em></li> |
60 | | -<li>Copy <em>jsoncols</em>, <em>jsonrange</em>, etc. to a “bin” directory (e.g. cp ~/Downloads/datatools-VERSION_NO-release/dist/linux-amd64/* ~/bin/)</li> |
61 | | -<li>From the shell prompt run <code>jsoncols -h</code> to confirm you were successful</li> |
| 142 | +<li>Download the zip file</li> |
| 143 | +<li>Unzip the zip file</li> |
| 144 | +<li>Copy the executables to $HOME/bin (or a folder in your path)</li> |
| 145 | +<li>Test</li> |
62 | 146 | </ol> |
63 | 147 |
|
| 148 | +<p>Here’s an example of the commands run in from the Bash shell after |
| 149 | +downloading the zip file.</p> |
| 150 | + |
| 151 | +<pre><code class="language-shell"> cd Downloads/ |
| 152 | + unzip datatools-*-linux-amd64.zip |
| 153 | + mkdir -p $HOME/bin |
| 154 | + cp -v bin/* $HOME/bin/ |
| 155 | + export PATH=$HOME/bin:$PATH |
| 156 | + csvfind -version |
| 157 | +</code></pre> |
| 158 | + |
64 | 159 | <h3>Raspberry Pi</h3> |
65 | 160 |
|
66 | | -<p>If you are using a Raspberry Pi 2 or later use the ARM7 VERSION_NO, ARM6 is only for the first generaiton Raspberry Pi.</p> |
| 161 | +<p>Released version is for a Raspberry Pi 2 or later use (i.e. requires ARM 7 support).</p> |
67 | 162 |
|
68 | 163 | <ol> |
69 | | -<li>Download <strong>datatools-VERSION_NO-release.zip</strong> from <a href="https://github.com/caltechlibrary/datatools/releases/latest">https://github.com/caltechlibrary/datatools/releases/latest</a></li> |
70 | | -<li>Find and unzip <strong>datatools-VERSION_NO-release.zip</strong></li> |
71 | | -<li>In the unziped directory and find for <em>dist/raspberrypi-arm7/</em></li> |
72 | | -<li>Copy <em>jsoncols</em>, <em>jsonrange</em>, etc. to a “bin” directory (e.g. cp ~/Downloads/datatools-VERSION_NO-release/dist/raspberrypi-arm7/* ~/bin/) |
73 | | - |
74 | | -<ul> |
75 | | -<li>if you are using an original Raspberry Pi you should copy the ARM6 version instead</li> |
76 | | -</ul></li> |
77 | | -<li>From the shell prompt run <code>jsoncols -h</code> to confirm you were successful</li> |
| 164 | +<li>Download the zip file</li> |
| 165 | +<li>Unzip the zip file</li> |
| 166 | +<li>Copy the executables to $HOME/bin (or a folder in your path)</li> |
| 167 | +<li>Test</li> |
78 | 168 | </ol> |
79 | 169 |
|
80 | | -<h2>Compiling from source</h2> |
81 | | - |
82 | | -<p>If you have go v1.7.4 or better installed then should be able to “go get” to install all the <strong>datatools</strong> utilities and</p> |
| 170 | +<p>Here’s an example of the commands run in from the Bash shell after |
| 171 | +downloading the zip file.</p> |
83 | 172 |
|
84 | | -<pre><code> go get -u github.com/caltechlibrary/datatools/... |
| 173 | +<pre><code class="language-shell"> cd Downloads/ |
| 174 | + unzip datatools-*-raspbian-arm7.zip |
| 175 | + mkdir -p $HOME/bin |
| 176 | + cp -v bin/* $HOME/bin/ |
| 177 | + export PATH=$HOME/bin:$PATH |
| 178 | + csvfind -version |
85 | 179 | </code></pre> |
86 | 180 |
|
87 | | -<p>Or for Windows 10 Powershell (assumes the Windows versions of Go and Git are previously installed)</p> |
| 181 | +<h2>Compiling from source</h2> |
| 182 | + |
| 183 | +<p><em>datatools</em> is “go gettable”. Use the “go get” command to download the dependant packages |
| 184 | +as well as <em>datatools</em>’s source code.</p> |
88 | 185 |
|
89 | | -<pre><code class="language-powershell"> $Env:GOPATH = "$HOME" |
90 | | - go get -u github.com/caltechlibrary/datatools/... |
| 186 | +<pre><code class="language-shell"> go get -u github.com/caltechlibrary/datatools/... |
91 | 187 | </code></pre> |
92 | 188 |
|
93 | | -<p>or to install from source on Linux/Unix systems</p> |
| 189 | +<p>Or clone the repstory and then compile</p> |
94 | 190 |
|
95 | | -<pre><code class="language-bash"> git clone https://github.com/caltechlibrary/datatools src/github.com/caltechlibrary/datatools |
| 191 | +<pre><code class="language-shell"> cd |
| 192 | + git clone https://github.com/caltechlibrary/datatools src/github.com/caltechlibrary/datatools |
96 | 193 | cd src/github.com/caltechlibrary/datatools |
97 | 194 | make |
98 | 195 | make test |
99 | 196 | make install |
100 | 197 | </code></pre> |
101 | 198 |
|
102 | | -<p>Or for Windows 10 Powershell</p> |
103 | | - |
104 | | -<pre><code class="language-powershell"> $Env:GOBIN = "$HOME\bin" |
105 | | - git clone https://github.com/caltechlibrary/datatools src/github.com/caltechlibrary/datatools |
106 | | - cd src\github.com\caltechlibrary\datatools |
107 | | - go install cmds\jsoncols\filefile.go |
108 | | -</code></pre> |
109 | | - |
110 | 199 | </section> |
111 | 200 |
|
112 | 201 | <footer> |
|
0 commit comments