Skip to content

Commit b0334d1

Browse files
committed
Fixed bug in reldate where Month and Monday were confused.
2 parents bd0c04b + f2f5668 commit b0334d1

File tree

121 files changed

+5430
-3964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+5430
-3964
lines changed

INSTALL.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11

2-
# Installation
2+
Installation
3+
============
34

45
*datatools* is a collection of command line programs run from a shell like Bash.
56

6-
## Compiled version
7+
Compiled version
8+
----------------
79

810
This is generalized instructions for a release.
911

10-
Compiled versions are available for Mac OS X (amd64 processor, macosx-amd64), Linux (amd64 process, linux-amd64),
12+
Compiled versions are available for Mac OS X (amd64 and M1 processor, macos-amd64 and macos-arm64), Linux (amd64 process, linux-amd64),
1113
Windows (amd64 processor, windows-amd64) and Rapsberry Pi (arm7 processor, raspbian-arm7)
1214

1315
VERSION_NUMBER is a [symantic version number](http://semver.org/) (e.g. v0.1.2)
@@ -21,20 +23,22 @@ For all the released version go to the project page on Github and click latest r
2123
| Platform | Zip Filename |
2224
|-------------|--------------------------------------------|
2325
| Windows | datatools-VERSION_NUMBER-windows-amd64.zip |
24-
| Mac OS X | datatools-VERSION_NUMBER-macosx-amd64.zip |
26+
| Mac OS X | datatools-VERSION_NUMBER-macos-amd64.zip |
27+
| Mac OS X | datatools-VERSION_NUMBER-macos-arm64.zip |
2528
| Linux/Intel | datatools-VERSION_NUMBER-linux-amd64.zip |
2629
| Raspbery Pi | datatools-VERSION_NUMBER-raspbian-arm7.zip |
2730

2831

29-
## The basic recipe
32+
The basic recipe
33+
----------------
3034

3135
+ Find the Zip file listed matching the architecture you're running and download it
3236
+ (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).
3337
+ Download the zip file and unzip the file.
3438
+ Copy the contents of the folder named "bin" to a folder that is in your path
3539
+ (e.g. "$HOME/bin" is common).
3640
+ Adjust your PATH if needed
37-
+ (e.g. `export PATH="$HOME/bin:$PATH"`)
41+
+ (e.g. export PATH="$HOME/bin:$PATH")
3842
+ Test
3943

4044

@@ -51,7 +55,7 @@ zip file.
5155

5256
```shell
5357
cd Downloads/
54-
unzip datatools-*-macosx-amd64.zip
58+
unzip datatools-*-macos-amd64.zip
5559
mkdir -p $HOME/bin
5660
cp -v bin/* $HOME/bin/
5761
export PATH=$HOME/bin:$PATH
@@ -120,7 +124,8 @@ downloading the zip file.
120124
```
121125

122126

123-
## Compiling from source
127+
Compiling from source
128+
---------------------
124129

125130
_datatools_ is "go gettable" if you have gotten xlsx v1.0.5 package from [github.com/tealeg/xlsx](https://github.com/tealeg/xlsx). The datatools package does not support versions v2.x and greater of xlsx. Below are the steps
126131
I use today with "go get" command to download the dependant packages

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Copyright (c) 2019, Caltech
2+
Copyright (c) 2021, Caltech
33
All rights not granted herein are expressly reserved by Caltech.
44

55
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Makefile

+34-3
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ dist/linux-amd64:
221221
rm -fR dist/bin
222222

223223

224-
dist/macosx-amd64:
224+
dist/macos-amd64:
225225
mkdir -p dist/bin
226226
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csvcols cmd/csvcols/csvcols.go
227227
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/csvrows cmd/csvrows/csvrows.go
@@ -249,10 +249,41 @@ dist/macosx-amd64:
249249
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/json2toml cmd/json2toml/json2toml.go
250250
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/yaml2json cmd/yaml2json/yaml2json.go
251251
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/json2yaml cmd/json2yaml/json2yaml.go
252-
cd dist && zip -r $(PROJECT)-$(VERSION)-macosx-amd64.zip README.md LICENSE INSTALL.md bin/* docs/* how-to/* demos/*
252+
cd dist && zip -r $(PROJECT)-$(VERSION)-macos-amd64.zip README.md LICENSE INSTALL.md bin/* docs/* how-to/* demos/*
253253
rm -fR dist/bin
254254

255255

256+
dist/macos-arm64:
257+
mkdir -p dist/bin
258+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csvcols cmd/csvcols/csvcols.go
259+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csvrows cmd/csvrows/csvrows.go
260+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csvfind cmd/csvfind/csvfind.go
261+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csvjoin cmd/csvjoin/csvjoin.go
262+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/jsoncols cmd/jsoncols/jsoncols.go
263+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/jsonrange cmd/jsonrange/jsonrange.go
264+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/xlsx2json cmd/xlsx2json/xlsx2json.go
265+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/xlsx2csv cmd/xlsx2csv/xlsx2csv.go
266+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csv2mdtable cmd/csv2mdtable/csv2mdtable.go
267+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csv2xlsx cmd/csv2xlsx/csv2xlsx.go
268+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csv2json cmd/csv2json/csv2json.go
269+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/jsonmunge cmd/jsonmunge/jsonmunge.go
270+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/jsonjoin cmd/jsonjoin/jsonjoin.go
271+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/findfile cmd/findfile/findfile.go
272+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/finddir cmd/finddir/finddir.go
273+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/mergepath cmd/mergepath/mergepath.go
274+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/reldate cmd/reldate/reldate.go
275+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/range cmd/range/range.go
276+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/timefmt cmd/timefmt/timefmt.go
277+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/urlparse cmd/urlparse/urlparse.go
278+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/csvcleaner cmd/csvcleaner/csvcleaner.go
279+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/string cmd/string/string.go
280+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/toml2json cmd/toml2json/toml2json.go
281+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/json2toml cmd/json2toml/json2toml.go
282+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/yaml2json cmd/yaml2json/yaml2json.go
283+
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/json2yaml cmd/json2yaml/json2yaml.go
284+
cd dist && zip -r $(PROJECT)-$(VERSION)-macos-arm64.zip README.md LICENSE INSTALL.md bin/* docs/* how-to/* demos/*
285+
rm -fR dist/bin
286+
256287

257288
dist/windows-amd64:
258289
mkdir -p dist/bin
@@ -329,5 +360,5 @@ distribute_docs:
329360
cp -vR how-to dist/
330361
./package-versions.bash > dist/package-versions.txt
331362

332-
release: distribute_docs dist/linux-amd64 dist/macosx-amd64 dist/windows-amd64 dist/raspbian-arm7
363+
release: distribute_docs dist/linux-amd64 dist/macos-amd64 dist/macos-arm64 dist/windows-amd64 dist/raspbian-arm7
333364

README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

2-
# datatools
2+
datatools
3+
=========
34

45
_datatools_ provides a variety of command line programs for working with
56
data in different formats as well as to ease Posix shell scripting
67
(e.g. writing scripts that run under Bash). The tools are group as data,
78
strings and scripting.
89

9-
## For data
10+
For data
11+
--------
1012

1113
Command line utilities for simplifying work with CSV, JSON, TOML, YAML,
1214
Excel Workbooks and plain text files or content.
@@ -36,7 +38,8 @@ Windows 10 (amd64) and Raspbian (ARM7). See https://github.com/caltechlibrary/da
3638

3739
Use "-help" option for a full list of options for each utility (e.g. `csv2json -help`).
3840

39-
## For strings
41+
For strings
42+
-----------
4043

4144
_datatools_ provides the [string](docs/string/) command for working with
4245
text strings (limited to memory available). This is commonly needed when
@@ -64,7 +67,8 @@ Some of the features included
6467

6568
See [string](docs/string/) for full details
6669

67-
## For scripting
70+
For scripting
71+
-------------
6872

6973
Various utilities for simplifying work on the command line.
7074

@@ -82,7 +86,8 @@ Windows 10 (amd64) and Raspbian (ARM7). See https://github.com/caltechlibrary/da
8286
Use the utilities try "-help" option for a full list of options.
8387

8488

85-
## Installation
89+
Installation
90+
------------
8691

8792
See [INSTALL.md](install.html) for details for installing pre-compiled
8893
versions of the programs.

RELEASES.html

+68-48
Original file line numberDiff line numberDiff line change
@@ -11,63 +11,83 @@
1111
</header>
1212
<nav>
1313
<ul>
14-
<li><a href="/">Home</a></li>
15-
<li><a href="index.html">README</a></li>
16-
<li><a href="license.html">LICENSE</a></li>
17-
<li><a href="install.html">INSTALL</a></li>
18-
<li><a href="docs/">Documentation</a></li>
19-
<li><a href="how-to/">How To</a></li>
20-
<li><a href="https://github.com/caltechlibrary/datatools">Github</a></li>
14+
<li>
15+
<a href="/">Home</a>
16+
</li>
17+
<li>
18+
<a href="index.html">README</a>
19+
</li>
20+
<li>
21+
<a href="license.html">LICENSE</a>
22+
</li>
23+
<li>
24+
<a href="install.html">INSTALL</a>
25+
</li>
26+
<li>
27+
<a href="docs/">Documentation</a>
28+
</li>
29+
<li>
30+
<a href="how-to/">How To</a>
31+
</li>
32+
<li>
33+
<a href="https://github.com/caltechlibrary/datatools">Github</a>
34+
</li>
2135
</ul>
22-
2336
</nav>
2437

2538
<section>
26-
<h1>Release Process and tags</h1>
27-
28-
<h2>Preleases and production releases</h2>
29-
30-
<p>This describes a simple release process organized around semantic versioned tags.</p>
31-
32-
<p>When a new release is ready it should be tag as v0.XX.XX-pre (where XX is a number) and published as a &lsquo;pre-release&rsquo; on
33-
Github. Send a note to the development group so someone other than the proposer of the release will be able to
34-
indepentently evaluate the release changes. At a minimum they should run <code>bash test_cmds.bash</code> and walk through some
35-
of the documentation examples. If the release is verified as ready then a new release will be cut with a tag like
36-
v0.XX.XX (there the XX are the same as in v0.XX.XX-pre). E.g. v0.0.10-pre would become v0.0.10 on success.</p>
37-
38-
<p>If the release fails verification, bugs need to be fixed and a new release proposed create after the fixes.
39-
The &ldquo;patch&rdquo; number persion should be incremented in v0.XX.XX-pre (e.g. v0.0.10-pre would be followed by
40-
v0.0.11-pre indicating that patches).</p>
41-
42-
<p>NOTE: This means there their can be skips in the production patch numbers between release. E.g. v.0.0.9 might
43-
be followed by v0.0.10-pre, v0.0.11-pre, v0.0.12-pre before a v0.0.12 appears as a production release.</p>
44-
45-
<p>Production and pre-releases should include Zip files of the compiled cli to be tested by <code>bash test_cmds.bash</code>.</p>
46-
47-
<h2>Dev releases</h2>
48-
49-
<p>Dev release may happend from time to time as needed. They should always end in a &lsquo;-dev&rsquo; version number (e.g. v0.0.10-dev).
50-
They normally should not have any pre-compiled binaries to avoid confusion. They should be flagged as draft (pre-release)
51-
on Github.</p>
52-
53-
<h2>Making a release</h2>
54-
55-
<ol>
56-
<li>Set the version number in PACKAGE.go (where PACKAGE is the name of the package, e.g. dataset is the name of the dataset
57-
package so you&rsquo;d change the version number in dataset.go).</li>
58-
<li>Run <code>make clean</code></li>
59-
<li>Run <code>make test</code> and make sure they pass, if some fail document it if you plan to release it (e.g. GSheet integration not tested because&hellip;)</li>
60-
<li>Run <code>make release</code></li>
39+
<h1 id="release-process-and-tags">
40+
Release Process and tags
41+
</h1>
42+
<h2 id="preleases-and-production-releases">
43+
Preleases and production releases
44+
</h2>
45+
<p>
46+
This describes a simple release process organized around semantic versioned tags.
47+
</p>
48+
<p>
49+
When a new release is ready it should be tag as v0.XX.XX-pre (where XX is a number) and published as a ‘pre-release’ on Github. Send a note to the development group so someone other than the proposer of the release will be able to indepentently evaluate the release changes. At a minimum they should run <code>bash test_cmds.bash</code> and walk through some of the documentation examples. If the release is verified as ready then a new release will be cut with a tag like v0.XX.XX (there the XX are the same as in v0.XX.XX-pre). E.g. v0.0.10-pre would become v0.0.10 on success.
50+
</p>
51+
<p>
52+
If the release fails verification, bugs need to be fixed and a new release proposed create after the fixes. The “patch” number persion should be incremented in v0.XX.XX-pre (e.g. v0.0.10-pre would be followed by v0.0.11-pre indicating that patches).
53+
</p>
54+
<p>
55+
NOTE: This means there their can be skips in the production patch numbers between release. E.g. v.0.0.9 might be followed by v0.0.10-pre, v0.0.11-pre, v0.0.12-pre before a v0.0.12 appears as a production release.
56+
</p>
57+
<p>
58+
Production and pre-releases should include Zip files of the compiled cli to be tested by <code>bash test_cmds.bash</code>.
59+
</p>
60+
<h2 id="dev-releases">
61+
Dev releases
62+
</h2>
63+
<p>
64+
Dev release may happend from time to time as needed. They should always end in a ‘-dev’ version number (e.g. v0.0.10-dev). They normally should not have any pre-compiled binaries to avoid confusion. They should be flagged as draft (pre-release) on Github.
65+
</p>
66+
<h2 id="making-a-release">
67+
Making a release
68+
</h2>
69+
<ol type="1">
70+
<li>
71+
Set the version number in PACKAGE.go (where PACKAGE is the name of the package, e.g. dataset is the name of the dataset package so you’d change the version number in dataset.go).
72+
</li>
73+
<li>
74+
Run <code>make clean</code>
75+
</li>
76+
<li>
77+
Run <code>make test</code> and make sure they pass, if some fail document it if you plan to release it (e.g. GSheet integration not tested because…)
78+
</li>
79+
<li>
80+
Run <code>make release</code>
81+
</li>
6182
</ol>
62-
63-
<p>You are now ready to go to Github and create a release. If you are uploading compiled versions upload the zip files in the <em>dist</em>
64-
folder.</p>
65-
83+
<p>
84+
You are now ready to go to Github and create a release. If you are uploading compiled versions upload the zip files in the <em>dist</em> folder.
85+
</p>
6686
</section>
6787

6888
<footer>
6989
<span><h1><A href="http://caltech.edu">Caltech</a></h1></span>
70-
<span>&copy; 2019 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
90+
<span>&copy; 2021 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
7191
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
7292
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
7393
<span><a href="mailto:[email protected]">Email Us</a></span>

RELEASES.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

2-
# Release Process and tags
2+
Release Process and tags
3+
========================
34

4-
## Preleases and production releases
5+
Preleases and production releases
6+
---------------------------------
57

68
This describes a simple release process organized around semantic versioned tags.
79

@@ -20,13 +22,15 @@ be followed by v0.0.10-pre, v0.0.11-pre, v0.0.12-pre before a v0.0.12 appears as
2022

2123
Production and pre-releases should include Zip files of the compiled cli to be tested by `bash test_cmds.bash`.
2224

23-
## Dev releases
25+
Dev releases
26+
------------
2427

2528
Dev release may happend from time to time as needed. They should always end in a '-dev' version number (e.g. v0.0.10-dev).
2629
They normally should not have any pre-compiled binaries to avoid confusion. They should be flagged as draft (pre-release)
2730
on Github.
2831

29-
## Making a release
32+
Making a release
33+
----------------
3034

3135
1. Set the version number in PACKAGE.go (where PACKAGE is the name of the package, e.g. dataset is the name of the dataset
3236
package so you'd change the version number in dataset.go).

0 commit comments

Comments
 (0)