Import/Export Tools
===================

Import/export support is provided via plugins. These plugins can be accessed
over the web via the Conference Manager's "Import/Export Data" page, or via the
command line using the tools/importExport.php utility.

OCS ships with several of these plugins, including: the "Papers XML Plugin",
which allows import and export of conference papers, and the "Users XML
Plugin", which allows import and export of users.

Additional plugins may be installed simply by copying them into subdirectories
of the plugins/importexport directory; they will automatically be added to the
list of available plugins.

Each import/export plugin has a unique name, defined in its PHP source code, by
which it can be invoked using the command line tool. To get a list of all
plugins via the command line, execute the following:

	php tools/importExport.php list

To invoke a particular plugin from the command line, execute the following:

	php tools/importExport.php [pluginName] [arguments ...]

For example, to get help from the NativeImportExportPlugin on its usage:

	php tools/importExport.php NativeImportExportPlugin usage

Each plugin requires a different set of arguments; for information on each,
refer to its documentation.

Developers of new plugins are encouraged to follow the standards set in the two
included plugins. For example:

	- Command-line argument styles should be consistent;
	- Conferences should be addressed by path;
	- Local hrefs, such as <href src="localFile"/>, should be supported
	  only by the command line tool and should be discarded by the web-
	  based tool for security reasons;
	- XML-based import/export plugins should use the XMLReader and XMLWriter
	  classes to ensure compatibility with PHP4 and PHP5;
	- etc.


Papers XML Plugin
=================

This plugin supports import and export of conference papers based on the DTD
supplied in plugins/importexport/native/native.dtd. It supports the following
root elements: <paper> and <papers>.

To get usage information for the command line tool, execute the following:

php tools/importExport.php NativeImportExportPlugin usage


Users XML Plugin
================

This plugin supports import and export of users and their roles based on the
DTD supplied in plugins/importexport/users/users.dtd, with "users" as the root
element.

To get usage information for the command line tool, execute the following:

php tools/importExport.php UserImportExportPlugin usage

This plugin treats emails as unique user identifiers in order to ensure that
duplicate users are not created. If an existing user is found in the database
with the same email as an imported user, no additional user is created; the
roles described in the XML file are attributed instead to the existing user.
Usernames are treated likewise.
