Skip to content

Commit a80d4a0

Browse files
committed
Quick Save
1 parent ac06d8d commit a80d4a0

File tree

144 files changed

+611
-21
lines changed

Some content is hidden

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

144 files changed

+611
-21
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ _testmain.go
3333
dist/*
3434
bin/*
3535
*.snap
36+
37+
# Project ignores
38+
_codemeta.json

CITATION.cff

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
cff-version: 1.2.0
22
message: "If you use this software, please cite it as below."
3-
title: datatools
3+
type: software
4+
title: "datatools"
5+
abstract: "A set of command line tools for working with CSV, Excel
6+
Workbooks, JSON and structured text documents."
47
authors:
58
- family-names: Doiel
69
given-names: R. S.
7-
orcid: https://orcid.org/0000-0003-0900-6903
8-
abstract: A set of command line tools for working with CSV, Excel Workbooks, Google Sheets, JSON and structured text documents.
10+
orcid: "https://orcid.org/0000-0003-0900-6903"
11+
912
repository-code: "https://github.com/caltechlibrary/datatools"
10-
type: software
1113
version: 1.1.3
1214
license-url: "https://data.caltech.edu/license"
13-
keywords:
14-
- csv
15-
- json
16-
- xlsx
17-
- golang
18-
- bash
15+
keywords: [ "csv", "json", "xlsx", "golang", "bash" ]
1916
date-released: 2022-06-30

Makefile

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ VERSION = $(shell grep '"version":' codemeta.json | cut -d\" -f 4)
1111

1212
BRANCH = $(shell git branch | grep '* ' | cut -d\ -f 2)
1313

14-
CODEMETA2CFF = $(shell which codemeta2cff)
14+
PANDOC = $(shell which pandoc)
1515

1616
OS = $(shell uname)
1717

@@ -22,12 +22,12 @@ ifneq ($(prefix),)
2222
PREFIX = $(prefix)
2323
endif
2424

25-
EXT =
25+
EXT =
2626
ifeq ($(OS), Windows)
2727
EXT = .exe
2828
endif
2929

30-
build: version.go $(PROGRAMS) CITATION.cff
30+
build: version.go $(PROGRAMS) CITATION.cff about.md
3131

3232
version.go: .FORCE
3333
@echo "package $(PROJECT)" >version.go
@@ -36,8 +36,13 @@ version.go: .FORCE
3636
@echo '' >>version.go
3737
@git add version.go
3838

39-
CITATION.cff: $(PROGRAMS) .FORCE
40-
-if [ -f ./bin/codemeta2cff$(EXT) ]; then ./bin/codemeta2cff; fi
39+
about.md: codemeta.json .FORCE
40+
cat codemeta.json | sed -E 's/"@context"/"at__context"/g;s/"@type"/"at__type"/g;s/"@id"/"at__id"/g' >_codemeta.json
41+
if [ -f $(PANDOC) ]; then echo "" | $(PANDOC) --metadata title="About $(PROJECT)" --metadata-file=_codemeta.json --template=codemeta-md.tmpl >about.md; fi
42+
43+
CITATION.cff: codemeta.json .FORCE
44+
cat codemeta.json | sed -E 's/"@context"/"at__context"/g;s/"@type"/"at__type"/g;s/"@id"/"at__id"/g' >_codemeta.json
45+
if [ -f $(PANDOC) ]; then echo "" | $(PANDOC) --metadata title="Cite $(PROJECT)" --metadata-file=_codemeta.json --template=codemeta-cff.tmpl >CITATION.cff; fi
4146

4247
$(PROGRAMS): $(PACKAGE)
4348
@mkdir -p bin
@@ -70,7 +75,7 @@ publish:
7075
bash mk-website.bash
7176
bash publish.bash
7277

73-
clean:
78+
clean:
7479
@if [ -f version.go ]; then rm version.go; fi
7580
@if [ -d bin ]; then rm -fR bin; fi
7681
@if [ -d dist ]; then rm -fR dist; fi
@@ -100,14 +105,14 @@ dist/macos-amd64: $(PROGRAMS)
100105
@for FNAME in $(PROGRAMS); do env GOOS=darwin GOARCH=amd64 go build -o dist/bin/$$FNAME cmd/$$FNAME/*.go; done
101106
@cd dist && zip -r $(PROJECT)-v$(VERSION)-macos-amd64.zip LICENSE codemeta.json CITATION.cff *.md bin/* docs/* how-to/* demos/*
102107
@rm -fR dist/bin
103-
108+
104109

105110
dist/macos-arm64: $(PROGRAMS)
106111
@mkdir -p dist/bin
107112
@for FNAME in $(PROGRAMS); do env GOOS=darwin GOARCH=arm64 go build -o dist/bin/$$FNAME cmd/$$FNAME/*.go; done
108113
@cd dist && zip -r $(PROJECT)-v$(VERSION)-macos-arm64.zip LICENSE codemeta.json CITATION.cff *.md bin/* docs/* how-to/* demos/*
109114
@rm -fR dist/bin
110-
115+
111116

112117
dist/windows-amd64: $(PROGRAMS)
113118
@mkdir -p dist/bin
@@ -143,7 +148,7 @@ distribute_docs:
143148
@cp -v INSTALL.md dist/
144149
@cp -vR docs dist/
145150
@cp -vR how-to dist/
146-
151+
147152
gen_batfiles: .FORCE
148153
@echo '@echo off' >make.bat
149154
@echo 'REM This is a Windows 10 Batch file for building dataset command' >>make.bat

TODO.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
<a href="how-to/">How To</a>
3131
</li>
3232
<li>
33+
<a href="about.html">About</a>
34+
</li>
35+
<li>
3336
<a
3437
href="https://github.com/caltechlibrary/datatools">Github</a>
3538
</li>

about.html

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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>
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="about.html">About</a>
34+
</li>
35+
<li>
36+
<a
37+
href="https://github.com/caltechlibrary/datatools">Github</a>
38+
</li>
39+
</ul>
40+
</nav>
41+
42+
<section>
43+
<h1 id="about-this-software">
44+
About this software
45+
</h1>
46+
<h2 id="datatools-1.1.3">
47+
datatools 1.1.3
48+
</h2>
49+
<h3 id="authors">
50+
Authors
51+
</h3>
52+
<ul>
53+
<li>
54+
R. S. Doiel
55+
</li>
56+
</ul>
57+
<p>
58+
A set of command line tools for working with CSV, Excel Workbooks, JSON
59+
and structured text documents.
60+
</p>
61+
<ul>
62+
<li>
63+
License: https://data.caltech.edu/license
64+
</li>
65+
<li>
66+
GitHub: https://github.com/caltechlibrary/datatools
67+
</li>
68+
<li>
69+
Issues: https://github.com/caltechlibrary/datatools/issues
70+
</li>
71+
</ul>
72+
<h3 id="programming-languages">
73+
Programming languages
74+
</h3>
75+
<ul>
76+
<li>
77+
Go 1.19.2
78+
</li>
79+
</ul>
80+
<h3 id="operating-systems">
81+
Operating Systems
82+
</h3>
83+
<ul>
84+
<li>
85+
Linux
86+
</li>
87+
<li>
88+
Windows
89+
</li>
90+
<li>
91+
macOS
92+
</li>
93+
</ul>
94+
<h3 id="software-requiremets">
95+
Software Requiremets
96+
</h3>
97+
<ul>
98+
<li>
99+
Golang 1.19.2 or better
100+
</li>
101+
<li>
102+
Pandoc 2.19.2 or better
103+
</li>
104+
</ul>
105+
</section>
106+
107+
<footer>
108+
<span><h1><A href="http://caltech.edu">Caltech</a></h1></span>
109+
<span>&copy; 2021 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
110+
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
111+
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
112+
<span><a href="mailto:[email protected]">Email Us</a></span>
113+
<a class="cl-hide" href="sitemap.xml">Site Map</a>
114+
</footer>
115+
</body>
116+
</html>

about.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
cff-version: 1.2.0
3+
message: "If you use this software, please cite it as below."
4+
type: software
5+
title: "datatools"
6+
abstract: "A set of command line tools for working with CSV, Excel
7+
Workbooks, JSON and structured text documents."
8+
authors:
9+
- family-names: Doiel
10+
given-names: R. S.
11+
orcid: "https://orcid.org/0000-0003-0900-6903"
12+
13+
repository-code: "https://github.com/caltechlibrary/datatools"
14+
version: 1.1.3
15+
license-url: "https://data.caltech.edu/license"
16+
keywords: [ "csv", "json", "xlsx", "golang", "bash" ]
17+
date-released: 2022-06-30
18+
---
19+
20+
About this software
21+
===================
22+
23+
## datatools 1.1.3
24+
25+
### Authors
26+
27+
- R. S. Doiel
28+
29+
A set of command line tools for working with CSV, Excel Workbooks, JSON
30+
and structured text documents.
31+
32+
33+
- License: https://data.caltech.edu/license
34+
- GitHub: https://github.com/caltechlibrary/datatools
35+
- Issues: https://github.com/caltechlibrary/datatools/issues
36+
37+
38+
### Programming languages
39+
40+
- Go 1.19.2
41+
42+
### Operating Systems
43+
44+
- Linux
45+
- Windows
46+
- macOS
47+
48+
### Software Requiremets
49+
50+
- Golang 1.19.2 or better
51+
- Pandoc 2.19.2 or better

codemeta-cff.tmpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
type: software
4+
${if(name)}title: "${name}"${endif}
5+
${if(description)}abstract: "${description}"${endif}
6+
${if(author)}authors:
7+
${for(author)}
8+
- family-names: ${it.familyName}
9+
given-names: ${it.givenName}
10+
orcid: "${it.at__id}"
11+
${endfor}${endif}
12+
${if(codeRepository)}repository-code: "${codeRepository}"${endif}
13+
${if(version)}version: ${version}${endif}
14+
${if(license)}license-url: "${license}"${endif}
15+
${if(keywords)}keywords: [ ${for(keywords)}"${it}"${sep}, ${endfor} ]${endif}
16+
${if(datePublished)}date-released: ${datePublished}${endif}

codemeta-md.tmpl

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
cff-version: 1.2.0
3+
message: "If you use this software, please cite it as below."
4+
type: software
5+
${if(name)}title: "${name}"${endif}
6+
${if(description)}abstract: "${description}"${endif}
7+
${if(author)}authors:
8+
${for(author)}
9+
- family-names: ${it.familyName}
10+
given-names: ${it.givenName}
11+
orcid: "${it.at__id}"
12+
${endfor}${endif}
13+
${if(codeRepository)}repository-code: "${codeRepository}"${endif}
14+
${if(version)}version: ${version}${endif}
15+
${if(license)}license-url: "${license}"${endif}
16+
${if(keywords)}keywords: [ ${for(keywords)}"${it}"${sep}, ${endfor} ]${endif}
17+
${if(datePublished)}date-released: ${datePublished}${endif}
18+
---
19+
20+
About this software
21+
===================
22+
23+
## ${name} ${version}
24+
25+
${if(author)}
26+
### Authors
27+
28+
${for(author)}
29+
- ${it.givenName} ${it.familyName}
30+
${endfor}
31+
${endif}
32+
33+
${if(description)}
34+
${description}
35+
${endif}
36+
37+
38+
${if(license)}- License: ${license}${endif}
39+
${if(codeRepository)}- GitHub: ${codeRepository}${endif}
40+
${if(issueTracker)}- Issues: ${issueTracker}${endif}
41+
42+
43+
${if(programmingLanguage)}
44+
### Programming languages
45+
46+
${for(programmingLanguage)}
47+
- ${programmingLanguage}
48+
${endfor}
49+
${endif}
50+
51+
${if(operatingSystem)}
52+
### Operating Systems
53+
54+
${for(operatingSystem)}
55+
- ${operatingSystem}
56+
${endfor}
57+
${endif}
58+
59+
${if(softwareRequirements)}
60+
### Software Requiremets
61+
62+
${for(softwareRequirements)}
63+
- ${softwareRequirements}
64+
${endfor}
65+
$endif$
66+

0 commit comments

Comments
 (0)