Skip to content

Commit e7aca61

Browse files
committed
fix: website build issues
1 parent b4a7a78 commit e7aca61

14 files changed

+352
-54
lines changed

CITATION.cff

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ authors:
99
given-names: R. S.
1010
orcid: "https://orcid.org/0000-0003-0900-6903"
1111

12-
1312
maintainers:
1413
- family-names: Doiel
1514
given-names: R. S.

INSTALL.html

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

Makefile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,16 @@ endif
3939
build: version.go $(PROGRAMS) CITATION.cff about.md installer.sh
4040

4141
version.go: .FORCE
42-
@echo 'package $(PROJECT)' >version.go
43-
@echo '' >>version.go
44-
@echo 'const (' >>version.go
45-
@echo ' Version = "$(VERSION)"' >>version.go
46-
@echo '' >>version.go
47-
@echo 'LicenseText = `' >>version.go
48-
@cat LICENSE >>version.go
49-
@echo '`' >>version.go
50-
@echo ')' >>version.go
51-
@echo '' >>version.go
52-
-git add version.go
42+
@echo '' | pandoc --from t2t --to plain \
43+
--metadata-file codemeta.json \
44+
--metadata package=$(PROJECT) \
45+
--metadata version=$(VERSION) \
46+
--metadata release_date=$(RELEASE_DATE) \
47+
--metadata release_hash=$(RELEASE_HASH) \
48+
--template codemeta-version-go.tmpl \
49+
LICENSE >version.go
50+
51+
5352

5453

5554
about.md: codemeta.json .FORCE

about.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ <h3 id="maintainers">Maintainers</h3>
3737
<p>A set of command line tools for working with CSV, Excel Workbooks,
3838
JSON and structured text documents.</p>
3939
<ul>
40-
<li>License: https://data.caltech.edu/license</li>
41-
<li>GitHub: https://github.com/caltechlibrary/datatools</li>
42-
<li>Issues: https://github.com/caltechlibrary/datatools/issues</li>
40+
<li>License: <a href="https://data.caltech.edu/license"
41+
class="uri">https://data.caltech.edu/license</a></li>
42+
<li>GitHub: <a href="https://github.com/caltechlibrary/datatools"
43+
class="uri">https://github.com/caltechlibrary/datatools</a></li>
44+
<li>Issues: <a href="https://github.com/caltechlibrary/datatools/issues"
45+
class="uri">https://github.com/caltechlibrary/datatools/issues</a></li>
4346
</ul>
4447
<h3 id="programming-languages">Programming languages</h3>
4548
<ul>

about.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ About this software
3434
A set of command line tools for working with CSV, Excel Workbooks, JSON
3535
and structured text documents.
3636

37-
- License: https://data.caltech.edu/license
38-
- GitHub: https://github.com/caltechlibrary/datatools
39-
- Issues: https://github.com/caltechlibrary/datatools/issues
37+
- License: <https://data.caltech.edu/license>
38+
- GitHub: <https://github.com/caltechlibrary/datatools>
39+
- Issues: <https://github.com/caltechlibrary/datatools/issues>
4040

4141

4242
### Programming languages

codemeta-cff.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ ${for(author)}
99
given-names: ${it.givenName}
1010
orcid: "${it.at__id}"
1111
${endfor}${endif}
12-
${if(contributor)}contributors:
13-
${for(contributor)}
14-
- family-names: ${it.familyName}
15-
given-names: ${it.givenName}
16-
orcid: "${it.at__id}"
17-
${endfor}${endif}
1812
${if(maintainer)}maintainers:
1913
${for(maintainer)}
2014
- family-names: ${it.familyName}

codemeta-installer.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ INSTALLER="$$(basename "$$0")"
1616
#
1717
# Figure out what the zip file is named
1818
#
19-
OS_NAME="$$(uname -o)"
19+
OS_NAME="$$(uname)"
2020
MACHINE="$$(uname -m)"
2121
case "$$OS_NAME" in
2222
Darwin)

codemeta-md.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ ${if(description)}
5050
${description}
5151
${endif}
5252

53-
${if(license)}- License: ${license}${endif}
54-
${if(codeRepository)}- GitHub: ${codeRepository}${endif}
55-
${if(issueTracker)}- Issues: ${issueTracker}${endif}
53+
${if(license)}- License: <${license}>${endif}
54+
${if(codeRepository)}- GitHub: <${codeRepository}>${endif}
55+
${if(issueTracker)}- Issues: <${issueTracker}>${endif}
5656

5757

5858
${if(programmingLanguage)}

codemeta-version-go.tmpl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package $package$
2+
3+
import (
4+
"strings"
5+
)
6+
7+
const (
8+
// Version number of release
9+
Version = "$version$"
10+
11+
// ReleaseDate, the date version.go was generated
12+
ReleaseDate = "$release_date$"
13+
14+
// ReleaseHash, the Git hash when version.go was generated
15+
ReleaseHash = "$release_hash$"
16+
17+
LicenseText = `
18+
$body$
19+
`
20+
)
21+
22+
// FmtHelp lets you process a text block with simple curly brace markup.
23+
func FmtHelp(src string, appName string, version string, releaseDate string, releaseHash string) string {
24+
m := map[string]string {
25+
"{app_name}": appName,
26+
"{version}": version,
27+
"{release_date}": releaseDate,
28+
"{release_hash}": releaseHash,
29+
}
30+
for k, v := range m {
31+
if strings.Contains(src, k) {
32+
src = strings.ReplaceAll(src, k, v)
33+
}
34+
}
35+
return src
36+
}
37+

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h1 id="datatools">datatools</h1>
3939
<li>“string”, a tool providing the common string operations missing from
4040
shell</li>
4141
</ul>
42-
<p>See <a href="user-manual.md">user manual</a> for a complete list of
42+
<p>See <a href="user-manual.html">user manual</a> for a complete list of
4343
the command line programs. The data transformation tools include support
4444
for formats such as Excel XML, csv, tab delimited files, json, yaml and
4545
toml.</p>

installer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ INSTALLER="$(basename "$0")"
1616
#
1717
# Figure out what the zip file is named
1818
#
19-
OS_NAME="$(uname -o)"
19+
OS_NAME="$(uname)"
2020
MACHINE="$(uname -m)"
2121
case "$OS_NAME" in
2222
Darwin)

links-to-html.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- links-to-html.lua converts links to local Markdown documents to
2+
-- there respective .html counterparts.
3+
function Link(el)
4+
el.target = string.gsub(el.target, "%.md", ".html")
5+
return el
6+
end

0 commit comments

Comments
 (0)