Skip to content

Commit 5227f77

Browse files
committed
improve docs
1 parent f476e0f commit 5227f77

3 files changed

Lines changed: 60 additions & 36 deletions

File tree

backend/doi/api/inveniotypes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Type definitions specific to InvenioDRM
1+
// Type definitions specific to InvenioRDM
22

33
package api
44

5-
// InvenioRecordResponse is the representation of a record stored in InvenioDRM
5+
// InvenioRecordResponse is the representation of a record stored in InvenioRDM
66
type InvenioRecordResponse struct {
77
Links InvenioRecordResponseLinks `json:"links"`
88
// Metadata InvenioRecordMetadata `json:"metadata"`

backend/doi/invenio.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Implementation for InvenioDRM
1+
// Implementation for InvenioRDM
22

33
package doi
44

@@ -18,13 +18,13 @@ import (
1818

1919
var invenioRecordRegex = regexp.MustCompile(`\/records?\/(.+)`)
2020

21-
// Returns true if resolvedURL is likely a DOI hosted on an InvenioDRM intallation
21+
// Returns true if resolvedURL is likely a DOI hosted on an InvenioRDM intallation
2222
func activateInvenio(ctx context.Context, srv *rest.Client, pacer *fs.Pacer, resolvedURL *url.URL) (isActive bool) {
2323
_, _, err := resolveInvenioEndpoint(ctx, srv, pacer, resolvedURL)
2424
return err == nil
2525
}
2626

27-
// Resolve the main API endpoint for a DOI hosted on an InvenioDRM installation
27+
// Resolve the main API endpoint for a DOI hosted on an InvenioRDM installation
2828
func resolveInvenioEndpoint(ctx context.Context, srv *rest.Client, pacer *fs.Pacer, resolvedURL *url.URL) (provider Provider, endpoint *url.URL, err error) {
2929
var res *http.Response
3030
opts := rest.Opts{

docs/content/doi.md

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,63 @@ versionIntroduced: "?"
66

77
# {{< icon "fa fa-building-columns" >}} DOI
88

9+
The DOI remote is a read only remote for reading files from digital object identifiers (DOI).
10+
11+
Currently, the DOI backend supports supports DOIs hosted with:
12+
- [InvenioRDM](https://inveniosoftware.org/products/rdm/)
13+
- [Zenodo](https://zenodo.org)
14+
- [CaltechDATA](https://data.caltech.edu)
15+
- [Other InvenioRDM repositories](https://inveniosoftware.org/showcase/)
16+
- [Dataverse](https://dataverse.org)
17+
- [Harvard Dataverse](https://dataverse.harvard.edu)
18+
- [Other Dataverse repositories](https://dataverse.org/installations)
19+
920
Paths are specified as `remote:path`
1021

1122
Paths may be as deep as required, e.g. `remote:directory/subdirectory`.
1223

24+
## Configuration
25+
26+
Here is an example of how to make a remote called `remote`. First run:
27+
28+
rclone config
29+
30+
This will guide you through an interactive setup process:
31+
32+
```
33+
No remotes found, make a new one?
34+
n) New remote
35+
s) Set configuration password
36+
q) Quit config
37+
n/s/q> n
38+
Enter name for new remote.
39+
name> remote
40+
Type of storage to configure.
41+
Choose a number from below, or type in your own value
42+
[snip]
43+
XX / DOI datasets
44+
\ (doi)
45+
[snip]
46+
Storage> doi
47+
Option doi.
48+
The DOI or the doi.org URL.
49+
Enter a value.
50+
doi> 10.5281/zenodo.5876941
51+
Edit advanced config?
52+
y) Yes
53+
n) No (default)
54+
y/n> n
55+
Configuration complete.
56+
Options:
57+
- type: doi
58+
- doi: 10.5281/zenodo.5876941
59+
Keep this "remote" remote?
60+
y) Yes this is OK (default)
61+
e) Edit this remote
62+
d) Delete this remote
63+
y/e/d> y
64+
```
65+
1366
{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/doi/doi.go then run make backenddocs" >}}
1467
### Standard options
1568

@@ -74,40 +127,11 @@ Show metadata about the DOI.
74127

75128
rclone backend metadata remote: [options] [<arguments>+]
76129

77-
This command returns the JSON representation of the DOI.
130+
This command returns a JSON object with some information about the DOI.
78131

79132
rclone backend medatadata doi:
80133

81-
It returns a JSON object representing the DOI.
82-
83-
84-
### title
85-
86-
Show the DOI title if available.
87-
88-
rclone backend title remote: [options] [<arguments>+]
89-
90-
This command returns the DOI title.
91-
92-
rclone backend title doi:
93-
94-
It returns a string representing the DOI title.
95-
96-
97-
### provider
98-
99-
Show the DOI provider.
100-
101-
rclone backend provider remote: [options] [<arguments>+]
102-
103-
This command returns the DOI provider.
104-
105-
rclone backend provider doi:
106-
107-
This command can be used to update the rclone.conf file for faster operations with the doi backend
108-
as auto-detection for the provider can be avoided.
109-
110-
It returns a string representing the DOI provider.
134+
It returns a JSON object representing metadata about the DOI.
111135

112136

113137
### set

0 commit comments

Comments
 (0)