Skip to content

Commit 318ab28

Browse files
committed
Updated template and docs
1 parent ba95336 commit 318ab28

13 files changed

Lines changed: 575 additions & 82 deletions

File tree

INSTALL.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11

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

45
*crossrefapi* is a command line program run from a shell like Bash. It allows you to retrieve JSON works and types object from the CrossRefAPI in a
56
[polite](https://github.com/CrossRef/rest-api-doc#etiquette) manner.
67

78
This is generalized instructions for a release. For deployment suggestions see NOTES.md
89

9-
## Compiled version
10+
Compiled version
11+
----------------
1012

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

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

2932

30-
## The basic recipe
33+
The basic recipe
34+
----------------
3135

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

4145

@@ -52,7 +56,7 @@ zip file.
5256

5357
```shell
5458
cd Downloads/
55-
unzip crossrefapi-*-macosx-amd64.zip
59+
unzip crossrefapi-*-macos-amd64.zip
5660
mkdir -p $HOME/bin
5761
cp -v bin/* $HOME/bin/
5862
export PATH=$HOME/bin:$PATH
@@ -121,7 +125,8 @@ downloading the zip file.
121125
```
122126

123127

124-
## Compiling from source
128+
Compiling from source
129+
---------------------
125130

126131
_crossrefapi_ is "go gettable". Use the "go get" command to download the dependant packages
127132
as well as _crossrefapi_'s source code.
@@ -142,5 +147,5 @@ Or clone the repstory and then compile
142147
make install
143148
```
144149

145-
Compilation assumes [go](https://github.com/golang/go) v1.10 and [bleve](https://blevesearh.com) v0.6.0.
150+
Compilation assumes [go](https://github.com/golang/go) v1.16
146151

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Copyright (c) 2018, 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:

cmd/crossrefapi/crossrefapi.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Author R. S. Doiel, <rsdoiel@library.caltech.edu>
66
//
7-
// Copyright (c) 2018, Caltech
7+
// Copyright (c) 2021, Caltech
88
// All rights not granted herein are expressly reserved by Caltech.
99
//
1010
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -61,7 +61,7 @@ Return the works for the doi "10.1037/0003-066x.59.1.29"
6161
license = `
6262
%s %s
6363
64-
Copyright (c) 2018, Caltech
64+
Copyright (c) 2021, Caltech
6565
All rights not granted herein are expressly reserved by Caltech.
6666
6767
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

codemeta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"codeRepository": "https://github.com/caltechlibrary/crossrefapi",
77
"issueTracker": "https://github.com/caltechlibrary/crossrefapi/issues",
88
"license": "https://caltechlibrary/crossrefapi/LICENSE",
9-
"version": "0.0.4",
9+
"version": "0.0.5",
1010
"author": [
1111
{
1212
"@type": "Person",
@@ -29,4 +29,4 @@
2929
"programmingLanguage": [
3030
"Go"
3131
]
32-
}
32+
}

crossrefapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
)
2020

2121
const (
22-
Version = `v0.0.4`
22+
Version = `v0.0.5`
2323
)
2424

2525
type CrossRefClient struct {

docs/index.html

Lines changed: 63 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,77 @@
1010
</header>
1111
<nav>
1212
<ul>
13-
<li><a href="/">Home</a></li>
14-
<li><a href="../">README</a></li>
15-
<li><a href="../license.html">LICENSE</a></li>
16-
<li><a href="../install.html">INSTALL</a></li>
17-
<li><a href="./">Documentation</a></li>
18-
<li><a href="https://github.com/caltechlibrary/crossrefapi">Github</a></li>
13+
<li>
14+
<a href="/">Home</a>
15+
</li>
16+
<li>
17+
<a href="../">README</a>
18+
</li>
19+
<li>
20+
<a href="../license.html">LICENSE</a>
21+
</li>
22+
<li>
23+
<a href="../install.html">INSTALL</a>
24+
</li>
25+
<li>
26+
<a href="./">Documentation</a>
27+
</li>
28+
<li>
29+
<a href="https://github.com/caltechlibrary/crossrefapi">Github</a>
30+
</li>
1931
</ul>
20-
2132
</nav>
2233

2334
<section>
24-
<h1>USAGE</h1>
25-
26-
<pre><code>crossrefapi [OPTIONS] types|works DOI
27-
</code></pre>
28-
29-
<h2>SYNOPSIS</h2>
30-
31-
<p>crossrefapi is a command line utility to retrieve &ldquo;types&rdquo; and &ldquo;works&rdquo; objects
32-
from the CrossRef API. It follows the etiquette suggested at</p>
33-
34-
<pre><code>https://github.com/CrossRef/rest-api-doc#etiquette
35-
</code></pre>
36-
37-
<p>EXAMPLES</p>
38-
39-
<p>Return the types of objects in CrossRef (e.g. journal articles)</p>
40-
41-
<pre><code>crossrefapi -mailto=&quot;jane.doe@example.edu&quot; types
42-
</code></pre>
43-
44-
<p>Return the works for the doi &ldquo;10.1000/xyz123&rdquo;</p>
45-
46-
<pre><code>crossrefapi -mailto=&quot;jane.doe@example.edu&quot; works &quot;10.1000/xyz123&quot;
47-
</code></pre>
48-
49-
<h2>OPTIONS</h2>
50-
51-
<pre><code> -generate-markdown-docs output documentation in Markdown
52-
-h, -help display help
53-
-l, -license display license
54-
-m, -mailto set the mailto value for API access
55-
-v, -version display app version
56-
</code></pre>
57-
58-
<p>crossrefapi v0.0.1</p>
59-
35+
<h1 id="usage">
36+
USAGE
37+
</h1>
38+
<pre><code>crossrefapi [OPTIONS] types|works DOI</code></pre>
39+
<h2 id="synopsis">
40+
SYNOPSIS
41+
</h2>
42+
<p>
43+
<em>crossrefapi</em> can retrieve “types” and “works” from the CrossRef API
44+
</p>
45+
<h2 id="description">
46+
DESCRIPTION
47+
</h2>
48+
<p>
49+
<em>crossrefapi</em> is a command line utility to retrieve “types” and “works” objects from the CrossRef API. It follows the etiquette suggested at
50+
</p>
51+
<pre><code> https://github.com/CrossRef/rest-api-doc#etiquette</code></pre>
52+
<h2 id="options">
53+
OPTIONS
54+
</h2>
55+
<p>
56+
Below are a set of options available.
57+
</p>
58+
<pre><code> -generate-manpage generate man page
59+
-generate-markdown output documentation in Markdown
60+
-h, -help display help
61+
-l, -license display license
62+
-m, -mailto set the mailto value for API access
63+
-v, -version display app version</code></pre>
64+
<h2 id="examples">
65+
EXAMPLES
66+
</h2>
67+
<p>
68+
Return the types of objects in CrossRef (e.g. journal articles)
69+
</p>
70+
<pre><code> crossrefapi -mailto=&quot;jdoe@example.edu&quot; types</code></pre>
71+
<p>
72+
Return the works for the doi “10.1037/0003-066x.59.1.29”
73+
</p>
74+
<pre><code> crossrefapi -mailto=&quot;jdoe@example.edu&quot; \
75+
works &quot;10.1037/0003-066x.59.1.29&quot;</code></pre>
76+
<p>
77+
crossrefapi v0.0.5
78+
</p>
6079
</section>
6180

6281
<footer>
6382
<span><h1><A href="https://caltech.edu">Caltech</a></h1></span>
64-
<span>&copy; 2018 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
83+
<span>&copy; 2021 <a href="https://www.library.caltech.edu/copyright">Caltech library</a></span>
6584
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
6685
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
6786
<span><a href="mailto:library@caltech.edu">Email Us</a></span>

docs/index.md

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,59 @@
11

2-
# USAGE
2+
USAGE
3+
=====
34

45
crossrefapi [OPTIONS] types|works DOI
56

6-
## SYNOPSIS
7+
SYNOPSIS
8+
--------
79

810

9-
crossrefapi is a command line utility to retrieve "types" and "works" objects
11+
_crossrefapi_ can retrieve "types" and "works" from the CrossRef API
12+
13+
14+
DESCRIPTION
15+
-----------
16+
17+
18+
_crossrefapi_ is a command line utility to retrieve "types" and "works" objects
1019
from the CrossRef API. It follows the etiquette suggested at
11-
12-
https://github.com/CrossRef/rest-api-doc#etiquette
1320

14-
EXAMPLES
21+
```
22+
https://github.com/CrossRef/rest-api-doc#etiquette
23+
```
1524

16-
Return the types of objects in CrossRef (e.g. journal articles)
1725

18-
crossrefapi -mailto="jane.doe@example.edu" types
26+
OPTIONS
27+
-------
1928

20-
Return the works for the doi "10.1000/xyz123"
29+
Below are a set of options available.
2130

22-
crossrefapi -mailto="jane.doe@example.edu" works "10.1000/xyz123"
31+
```
32+
-generate-manpage generate man page
33+
-generate-markdown output documentation in Markdown
34+
-h, -help display help
35+
-l, -license display license
36+
-m, -mailto set the mailto value for API access
37+
-v, -version display app version
38+
```
39+
40+
41+
EXAMPLES
42+
--------
2343

2444

45+
Return the types of objects in CrossRef (e.g. journal articles)
46+
47+
```
48+
crossrefapi -mailto="jdoe@example.edu" types
49+
```
2550

26-
## OPTIONS
51+
Return the works for the doi "10.1037/0003-066x.59.1.29"
2752

2853
```
29-
-generate-markdown-docs output documentation in Markdown
30-
-h, -help display help
31-
-l, -license display license
32-
-m, -mailto set the mailto value for API access
33-
-v, -version display app version
54+
crossrefapi -mailto="jdoe@example.edu" \
55+
works "10.1037/0003-066x.59.1.29"
3456
```
3557

3658

37-
crossrefapi v0.0.1
59+
crossrefapi v0.0.5

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module github.com/caltechlibrary/crossrefapi
33
go 1.16
44

55
require (
6-
github.com/caltechlibrary/cli v0.0.16
6+
github.com/caltechlibrary/cli v0.0.17
77
github.com/caltechlibrary/doitools v0.0.0-20190910184449-c524f84bb2b3
88
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github.com/caltechlibrary/cli v0.0.16 h1:jgw6dZb3VDy9L5LrWWm1ieqHYAMKgcv+NF6osSj3YRM=
2-
github.com/caltechlibrary/cli v0.0.16/go.mod h1:BVT+6d/QqcN4UApWR3ufjkkKj2O6+48B4G6iUpP8m38=
1+
github.com/caltechlibrary/cli v0.0.17 h1:vGNSZOxv5tMYLDrtI+kBkoI/ZzvKuit+Ps0RVhlb2dI=
2+
github.com/caltechlibrary/cli v0.0.17/go.mod h1:9crFPycCNeyTWautZ0t/YjaW8Clsr9uQZfq/SNNwhak=
33
github.com/caltechlibrary/doitools v0.0.0-20190910184449-c524f84bb2b3 h1:CPVAtgb3KfFDvN/LA6lk3JGT76tVC+PohQWynTkS52s=
44
github.com/caltechlibrary/doitools v0.0.0-20190910184449-c524f84bb2b3/go.mod h1:dBtDM+sEd5W27XSuPTcYGUNmkO9PWJ4JMh5bW1EO8L0=

0 commit comments

Comments
 (0)