Difference between revisions of "API:bin/import"

From EPrints Documentation
Jump to: navigation, search
(--migration)
Line 117: Line 117:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_b_parse_only -->
+
<!-- Pod2Wiki=item_b_arg_key_value -->
==='''--parse-only'''===
+
==='''--arg key=value'''===
  
Don't import, just check the file.
+
Add an argument to the import plugin. May be repeated. Effects depend on the import plugin.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 129: Line 129:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_b_migration -->
+
<!-- Pod2Wiki=item_b_parse_only -->
==='''--migration'''===
+
==='''--parse-only'''===
  
Turn on all the options needed to correctly import an XML data file exported from version 2, using the migration toolkit. This is the same as using --enable-import-ids --enable-import-datestamps --enable-file-imports --enable-web-imports --force
+
Don't import, just check the file.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 141: Line 141:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=item_b_enable_import_ids -->
+
<!-- Pod2Wiki=item_b_migration -->
 
+
==='''--migration'''===
==='''--enable-import-ids'''===
+
 
+
By default import will generate a new eprintid, or userid for each record. This option tells it to use the id spcified in the imported data. This is generally used for importing into a new repository from an old one.
+
 
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
+
<span style='display:none'>User Comments</span>
+
<!-- Edit below this comment -->
+
 
+
 
+
<!-- Pod2Wiki= -->
+
</div>
+
<!-- Pod2Wiki=item_b_enable_import_datestamps -->
+
==='''--enable-import-datestamps'''===
+
  
Normally import will set the datestamp the the time the eprint was imported. This option causes it to take the datestamp from the imported data, if available.
+
Turn on all the options needed to correctly import an XML data file exported from version 2, using the migration toolkit. Implies --enable-web-imports --enable-file-imports --force
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 269: Line 256:
 
Output version information and exit.
 
Output version information and exit.
  
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 +
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<span style='display:none'>User Comments</span>

Revision as of 10:47, 25 August 2011

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.3, 3.2) | Revision Log | Before editing this page please read Pod2Wiki


NAME

import - Import a file using an import plugin.

User Comments


SYNOPSIS

import repository_id [options] dataset

import repository_id [options] dataset plugin filename

User Comments


DESCRIPTION

This command imports a set of EPrints from a file into the given dataset.

User Comments


ARGUMENTS

User Comments


repository_id

The ID of the EPrint repository to import to.

User Comments


dataset

The name of the dataset to import into, such as "eprint","archive", "subject" or "user".

Please note that for the "subject" dataset, you are probably better off using the import_subjects tool which will empty the dataset before importing.

User Comments


plugin

The id of the input plugin to use. This should not include the leading "Import::". Examples: BibTeX, XML.

If this is ommited or an invalid plugin is requested, then 'import' will list all plugins compatible with the dataset and exit.

User Comments


OPTIONS

User Comments


--user USERID/USERNAME

For eprint datasets only. (not user or subject).

Sets the userid/username of the user in the system who will own the imported records.

Usually required for importing EPrint records. This may not be required if the import format contains the userid value, eg. an import in the EPrints 3 XML format.

If this is an integer then it is assumed to be the userid of the user, otherwise it is assumed to be the username.

You may wish to create one or more "bulk import" users and make imported eprint records belong to them.

User Comments


--arg key=value

Add an argument to the import plugin. May be repeated. Effects depend on the import plugin.

User Comments


--parse-only

Don't import, just check the file.

User Comments


--migration

Turn on all the options needed to correctly import an XML data file exported from version 2, using the migration toolkit. Implies --enable-web-imports --enable-file-imports --force

User Comments


--enable-file-imports

Allow the imported data to import files from the local filesystem. This can obviously be seen as a security hole if you don't trust the data you are importing. This sets the "enable_file_imports" configuration option for this session only.

User Comments


--enable-web-imports

Allow the imported data to import files from the Web. This can obviously be seen as a security hole if you don't trust the data you are importing. This sets the "enable_web_imports" configuration option for this session only.

User Comments


--update

Normally you can not import a new item with the same id as an existing item. With this option enabled existing items will be updated with the new item (implies --enable-import-ids).

User Comments


--force

Don't ask any questions, just do it!

User Comments


--help

Print a brief help message and exit.

User Comments


--man

Print the full manual page and then exit.

User Comments


--quiet

Be vewwy vewwy quiet. This option will supress all output unless an error occurs.

User Comments


--verbose

Explain in detail what is going on. May be repeated for greater effect.

Shows why a plugin is disabled.

User Comments


--version

Output version information and exit.

User Comments


COPYRIGHT

User Comments