Skip to content

Commit e34333a

Browse files
committed
2 parents ade6e50 + f08cd20 commit e34333a

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed

README.md

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,52 @@ their Eprints installation.
2929
If you want to download metadata from Eprints, you need to install
3030
[eprint-tools](https://github.com/caltechlibrary/eprinttools)
3131

32+
## Options
3233

33-
### Advanced
34+
There are three different scripts
3435

35-
You can also import the metadata transformation function into another python script by typing
36-
`python setup.py install` in the epxml_to_datacite directory. Then include
37-
`import caltech_thesis` at the top of your new script and you wil be able to
38-
call `epxml_to_datacite(eprint)`, where eprint is the xml parsed by something
39-
like:
36+
- `caltech_thesis.py`
37+
- `caltech_authors_to_data.py` (Prepares metadata from CaltechAUTHORS for submission to CaltechDATA)
38+
- `caltech_authors_tech_report.py` (Prepares metadata from CaltechAUTHORS tech reports with `monograph` item type (Report or Paper))
4039

41-
```
42-
infile = open('10271.xml',encoding="utf8")
43-
eprint = xmltodict.parse(infile.read())['eprints']['eprint']
44-
```
40+
In this documentation we use `caltech_thesis.py` as the example script, but in most cases you can substitute one of the other sources.
41+
42+
## Basic operation
43+
44+
If you have Eprints XML files (from thesis.library.caltech.edu/rest/eprint/1234.xml, for example), put them in the epxml_to_datacite folder. Type
45+
46+
`python caltech_thesis.py`
47+
48+
And you'll get '\_datacite.xml' for each xml file in the folder
4549

46-
## Downloading Eprints XML files
50+
## Downloading Eprints XML
4751

4852
You can use Eprints ids (e.g. 82938) to download Eprints xml files by adding a
4953
`-ids` option to any command. This requires eputil to be installed on your local systems.
5054

55+
`python caltech_thesis.py -ids 82938`
56+
5157
Alternativly, you can provide a tsv file, where the first column is the Eprints
5258
id using the `-id_file` option
5359

54-
## Using caltech_thesis.py
60+
`python caltech_thesis.py -id_file ids.tsv`
61+
62+
## Mint DOIs
5563

56-
Download .xml files from thesis.library.caltech.edu/rest/eprint/1234.xml and put
57-
them in the folder with caltech_thesis.py. Type `python caltech_thesis` and
58-
DataCite XML files will appear. If you want to mint DOIs add the `-mint`
59-
option and if you want to make test DOIs add the `-test` option to the command
60-
line.
64+
You can also have the script submit the metadata to DataCite and add the DOI to the source repository. Add the `-mint`
65+
option and if you want to make test DOIs add the `-test` option to the command line.
6166

62-
## Using caltech_authors_tech_report.py
67+
`python caltech_thesis.py -mint -ids 82938`
68+
69+
### Advanced
70+
71+
You can also import the metadata transformation function into another python script by typing
72+
`python setup.py install` in the epxml_to_datacite directory. Then include
73+
`import caltech_thesis` at the top of your new script and you wil be able to
74+
call `epxml_to_datacite(eprint)`, where eprint is the xml parsed by something
75+
like:
6376

64-
Will only work with items with the `monograph` item type (Report or Paper).
77+
```
78+
infile = open('10271.xml',encoding="utf8")
79+
eprint = xmltodict.parse(infile.read())['eprints']['eprint']
80+
```

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/epxml_to_datacite",
77
"issueTracker": "https://github.com/caltechlibrary/epxml_to_datacite/issues",
88
"license": "https://data.caltech.edu/license",
9-
"version": "0.11.5",
9+
"version": "0.11.6",
1010
"author": [
1111
{
1212
"@type": "Person",
@@ -17,7 +17,7 @@
1717
"@id": "https://orcid.org/0000-0001-9266-5146"
1818
}],
1919
"developmentStatus": "active",
20-
"downloadUrl": "https://github.com/caltechlibrary/ames/archive/v0.11.5.zip",
20+
"downloadUrl": "https://github.com/caltechlibrary/ames/archive/v0.11.6.zip",
2121
"keywords": [
2222
"GitHub",
2323
"Eprints",

0 commit comments

Comments
 (0)