Difference between revisions of "Import Files"

From EPrints Documentation
Jump to: navigation, search
m (stray text)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
[[Category: Howto]]
 +
[[Category: Out of Date]]
 +
 +
 
Here is a minimalist XML file to import local files into EPrints (provided by John Salter):
 
Here is a minimalist XML file to import local files into EPrints (provided by John Salter):
  
Line 39: Line 43:
  
 
This will put the eprint object straight into the live repository ("<eprint_status>archive</eprint_status>") - You may wish to place them into the user area ("<eprint_status>inbox</eprint_status>") or into the editorial review ("<eprint_status>buffer</eprint_status>") instead.
 
This will put the eprint object straight into the live repository ("<eprint_status>archive</eprint_status>") - You may wish to place them into the user area ("<eprint_status>inbox</eprint_status>") or into the editorial review ("<eprint_status>buffer</eprint_status>") instead.
 +
 +
See also similar page [[Import From URL]] and XML standardisation page [[EPData XML Representation]].

Latest revision as of 01:22, 12 September 2018


Here is a minimalist XML file to import local files into EPrints (provided by John Salter):

<?xml version='1.0' encoding='utf-8'?>
<eprints xmlns='http://eprints.org/ep2/data/2.0'>
  <eprint>
    <documents>
      <document>
        <files>
          <file>
            <datasetid>document</datasetid>
            <filename>thumb.jpg</filename>
            <url>file:///tmp/files/thumb.jpg</url>
          </file>
        </files>
        <format>image</format>
        <security>public</security>
        <main>thumb.jpg</main>
      </document>
    </documents>
    <eprint_status>archive</eprint_status>
    <userid>1</userid>
    <type>image</type>
    <creators>
      <item>
        <name>
          <family>test</family>
          <given>test</given>
        </name>
        <id>test@test.com</id>
      </item>
    </creators>
    <title>test</title>
  </eprint>
</eprints>

Note that this also set the title and the creators. You can override the "userid" when importing with the bin/import script (run it with "--help" to see how to do this).

This will put the eprint object straight into the live repository ("<eprint_status>archive</eprint_status>") - You may wish to place them into the user area ("<eprint_status>inbox</eprint_status>") or into the editorial review ("<eprint_status>buffer</eprint_status>") instead.

See also similar page Import From URL and XML standardisation page EPData XML Representation.