-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathep3util.1.html
174 lines (172 loc) · 5.41 KB
/
ep3util.1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html>
<head>
<title>Institutional Repository Data Management</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
</head>
<body>
<header>
<a href="http://library.caltech.edu" title="link to Caltech Library Homepage"><img src="https://caltechlibrary.github.io/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="index.html">README</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="search.html">Search Docs</a></li>
<li><a href="about.html">About</a></li>
<li><a href="https://github.com/caltechlibrary/irdmtools">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="name">NAME</h1>
<p>ep3util</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>ep3util <a href="#options">OPTIONS</a> ACTION [ACTION_PARAMETERS
…]</p>
<h1 id="description">DESCRIPTION</h1>
<p><strong>ep3util</strong> provides a quick wrapper around EPrints 3.3
REST API. By default ep3util looks for five environment variables.</p>
<dl>
<dt>REPO_ID</dt>
<dd>
the EPrints repository id (name of database and archive subdirectory).
</dd>
<dt>EPRINT_HOST</dt>
<dd>
the hostname for EPrint’s.
</dd>
<dt>EPRINT_USER</dt>
<dd>
the username having permissions to access the EPrint REST API.
</dd>
<dt>EPRINT_PASSWORD</dt>
<dd>
the password for the username with access to the EPrint REST API.
</dd>
<dt>C_NAME</dt>
<dd>
If harvesting the dataset collection name to harvest the records to.
</dd>
<dt>EPRINT_DB_HOST</dt>
<dd>
The MySQL hostname holding the EPrints repository database
</dd>
<dt>EPRINT_DB_USER</dt>
<dd>
The MySQL username used to access EPrints repository database
</dd>
<dt>EPRINT_DB_PASSWORD</dt>
<dd>
The MySQL password used to access EPrints repository database
</dd>
</dl>
<p>The environment provides the default values for configuration. They
maybe overwritten by using a JSON configuration file. The corresponding
attributes are “repo_id”, “eprint_host”, “c_name”, “eprint_db_host”,
“eprint_db_user”, and “eprint_db_password”.</p>
<p>If the environment variables for MySQL access are set then the
results reflect direct access to the database instead of the EPrint REST
API.</p>
<h1 id="options">OPTIONS</h1>
<dl>
<dt>help</dt>
<dd>
display help
</dd>
<dt>license</dt>
<dd>
display license
</dd>
<dt>version</dt>
<dd>
display version
</dd>
<dt>config</dt>
<dd>
provide a path to an alternate configuration file
(e.g. “irdmtools.json”)
</dd>
</dl>
<h1 id="action">ACTION</h1>
<p><strong>ep3util</strong> supports the following actions.</p>
<dl>
<dt>setup</dt>
<dd>
Display an example JSON setup configuration file, if it already exists
then it will display the current configuration file. No optional or
required parameters. When displaying the JSON configuration a
placeholder will be used for the token value.
</dd>
<dt>get_all_ids</dt>
<dd>
Returns a list of all repository record ids. The method uses OAI-PMH for
id retrieval. It is rate limited and will take come time to return all
record ids. A test instance took 11 minutes to retrieve 24000 record
ids.
</dd>
<dt>get_modified_ids START [END]</dt>
<dd>
Return a list of records created or modified in the START and END date
range. If END is not provided it is assume to be today.
</dd>
<dt>get_record RECORD_ID</dt>
<dd>
Returns a specific simplified record indicated by RECORD_ID, e.g. 23808.
The RECORD_ID is a required parameter.
</dd>
<dt>harvest <a href="#harvest_options">HARVEST_OPTIONS</a>
[KEY_LIST_JSON]</dt>
<dd>
harvest takes a JSON file containing a list of keys and harvests each
record into a dataset collection. If combined with one of the options,
e.g. <code>-all</code>, you can skip providing the KEY_LIST_JSON file.
</dd>
</dl>
<h1 id="harvest_options">HARVEST_OPTIONS</h1>
<dl>
<dt>-all</dt>
<dd>
Harvest all records
</dd>
<dt>-modified START [END]</dt>
<dd>
Harvest records modified between start and end dates.
</dd>
<dt>-as-citations</dt>
<dd>
This harvests the record into a minimal citation form similar to
citeproc
</dd>
</dl>
<h1 id="action_parameters">ACTION_PARAMETERS</h1>
<p>Action parameters are the specific optional or required parameters
need to complete an aciton.</p>
<h1 id="examples">EXAMPLES</h1>
<p>Setup for <strong>ep3util</strong> by writing an example JSON
configuration file. “nano” is an example text editor program, you need
to edit the sample configuration appropriately.</p>
<pre><code>ep3util setup >eprinttools.json
nano eprinttools.json</code></pre>
<p>Get a list of all EPrint record ids.</p>
<pre><code>ep3util get_all_ids</code></pre>
<p>Get a specific EPrint record. Record is validated against irdmtool
EPrints data model.</p>
<pre><code>ep3util get_record 23808</code></pre>
<p>Harvest all records</p>
<pre><code>ep3util harvest -all</code></pre>
<p>Harvest records created or modified in the month of September,
2023.</p>
<pre><code>ep3util harvest -modified 2023-09-01 2023-09-30</code></pre>
</section>
<footer>
<span>© 2023 <a href="https://www.library.caltech.edu/copyright">Caltech Library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span><a href="mailto:library@caltech.edu">Email Us</a></span>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
</footer>
</body>
</html>