@@ -29,36 +29,52 @@ their Eprints installation.
2929If 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
4852You 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+
5157Alternativly, you can provide a tsv file, where the first column is the Eprints
5258id 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+ ```
0 commit comments