EPrints 2.0.1 Documentation - import_subjects command |
import_subjects - rebuild an EPrint archive subjects list from the contents of a file
import_subjects archiveid [options] [subjectfile]
Import a set of subjects into an EPrints archive. The subjects are the heirarchical tree of options for ``subject'' type metadata fields in an eprint archive.
Use the staff admin subject editor for little tweaks. Use this command for the initial setup or bulk editing subjects. Use the exporter to dump the current subjects if you (an administrator) have edited them online.
This script should also be run after create_tables.
There are two different file formats excepted, the default colon seperated file and XML in the eprints export format.
The colon seperated ASCII is easier to edit, but is more limited. It is not intended for UTF-8 encoded characters and can only specify subject names in the default language.
The XML format can contain any unicode characters and also allows multiple languages for the names of subjects. You may wish to dump the current subjects out of eprints as XML. Edit it. Then re-import it. The downside is that this format is far more verbose.
This is the default format.
Comments may be placed on lines begining with a hash (#)
Each (non-comment) line of the file should be in the following format:
subjectid:name:parents:depositable
eg.
blgc-bphy:Biophysics:blgc,phys:1
Please see the main documentation for the meaning of these fields.
This is the standard eprints export format. It looks like this:
<eprintsdata> <record> <field name="subjectid">phys</field> <field name="name"><lang id="en">Physical Sciences & Mathematics</lang></field> <field name="parents">subjects</field> <field name="depositable">FALSE</field> </record> . . . </eprintsdata>
The fields have the same meaning as described for the ASCII format, with the following variations. The name field can (and should) have a name for each language supported by the archive. Multiple parents are indicated by multiple <lt
field name=``parents<gt>> elements. Depositable should be either TRUE or FALSE.
EPrints 2.0.1 Documentation - import_subjects command |