|
24 | 24 | </nav> |
25 | 25 |
|
26 | 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 |
| 27 | +<h1 id="installation-for-development-of-datatools">Installation for |
| 28 | +development of <strong>datatools</strong></h1> |
| 29 | +<p><strong>datatools</strong> A set of command line tools for working |
| 30 | +with CSV, Excel Workbooks, JSON and structured text documents.</p> |
| 31 | +<h2 id="quick-install-with-curl-or-irm">Quick install with curl or |
31 | 32 | 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.10" |
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.10' |
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> |
63 | | -<th>Platform</th> |
64 | | -<th>Zip Filename</th> |
65 | | -</tr> |
66 | | -</thead> |
67 | | -<tbody> |
68 | | -<tr> |
69 | | -<td>Windows</td> |
70 | | -<td>datatools-VERSION_NUMBER-Windows-x86_64.zip</td> |
71 | | -</tr> |
72 | | -<tr> |
73 | | -<td>Windows</td> |
74 | | -<td>datatools-VERSION_NUMBER-Windows-arm64.zip</td> |
75 | | -</tr> |
76 | | -<tr> |
77 | | -<td>Mac OS X</td> |
78 | | -<td>datatools-VERSION_NUMBER-macOS-x86_64.zip</td> |
79 | | -</tr> |
80 | | -<tr> |
81 | | -<td>Mac OS X</td> |
82 | | -<td>datatools-VERSION_NUMBER-macOS-arm64.zip</td> |
83 | | -</tr> |
84 | | -<tr> |
85 | | -<td>Linux/Intel</td> |
86 | | -<td>datatools-VERSION_NUMBER-Linux-x86_64.zip</td> |
87 | | -</tr> |
88 | | -<tr> |
89 | | -<td>Linux/ARM 64</td> |
90 | | -<td>datatools-VERSION_NUMBER-Linux-aarch64.zip</td> |
91 | | -</tr> |
92 | | -<tr> |
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> |
| 33 | +<p>There is an experimental installer.sh script that can be run with the |
| 34 | +following command to install latest table release. This may work for |
| 35 | +macOS, Linux and if you’re using Windows with the Unix subsystem. This |
| 36 | +would be run from your shell (e.g. Terminal on macOS).</p> |
| 37 | +<pre class="shell"><code>curl https://caltechlibrary.github.io/datatools/installer.sh | sh</code></pre> |
| 38 | +<p>This will install the programs included in datatools in your |
| 39 | +<code>$HOME/bin</code> directory.</p> |
| 40 | +<p>If you are running Windows 10 or 11 use the Powershell command |
| 41 | +below.</p> |
| 42 | +<div class="sourceCode" id="cb2"><pre |
| 43 | +class="sourceCode ps1"><code class="sourceCode powershell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">irm</span> https<span class="op">://</span>caltechlibrary<span class="op">.</span><span class="fu">github</span><span class="op">.</span><span class="fu">io</span><span class="op">/</span>datatools<span class="op">/</span>installer<span class="op">.</span><span class="fu">ps1</span> <span class="op">|</span> <span class="fu">iex</span></span></code></pre></div> |
| 44 | +<h2 id="installing-from-source">Installing from source</h2> |
| 45 | +<h3 id="required-software">Required software</h3> |
99 | 46 | <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> |
| 47 | +<li>Golang >= 1.23.5</li> |
| 48 | +<li>Pandoc >= 3.1</li> |
119 | 49 | </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> |
| 50 | +<h3 id="steps">Steps</h3> |
187 | 51 | <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> |
| 52 | +<li>git clone https://github.com/caltechlibrary/datatools</li> |
| 53 | +<li>Change directory into the <code>datatools</code> directory</li> |
| 54 | +<li>Make to build, test and install</li> |
192 | 55 | </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> |
| 56 | +<pre class="shell"><code>git clone https://github.com/caltechlibrary/datatools |
| 57 | +cd datatools |
| 58 | +make |
| 59 | +make test |
| 60 | +make install</code></pre> |
224 | 61 | </section> |
225 | 62 |
|
226 | 63 | <footer> |
|
0 commit comments