Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

usage: import.py [-h] [-v] [-d] [-a AUTHOR] [-t TITLE] [-i ISO] [-l DSHANDLE]
                 [-m META] [-u UID] [-e EMAIL] [-c]
                 document [parent]
 
import documents into application


positional arguments:

  document              document folder

  parent                UUID of parent collection

 

optional arguments:

  -h, --help            show this help message and exit

  -v, --verbose         show informational messages

  -d, --debug           show debugging messages

  -a AUTHOR, --author AUTHOR

                        set author

  -t TITLE, --title TITLE

                        set title

  -i ISO, --iso ISO     set language (iso code, 3 characters)

  -l DSHANDLE, --dshandle DSHANDLE

                        set DSpace handle link

  -m META, --meta META  set metadata fields (field=value)

  -u UID, --uid UID     user id uid of importing user

  -e EMAIL, --email EMAIL

                        email address of importing user (created_by)

  -c, --continue        continue even if there are errors (dangerous!)

 

Only one of UID or email address is needed to specify the importing user.

 

 


 

The import tool adds a document to the editor. The importer creates a UUID for the new document; then the folders are added to the application's file storage and revision and page entries inserted into the database.

...

The document's directory structure needs to be in the correct format so the importer can find ALTO XML and pictures files. If you have to import a lot of documents, you'd do well to make a trivial shell script to automate the process. Several working examples of previous imports can be found in the application's path.

 

/document

  /pages/1/5eb63bbbe01eeed093cb22bb8f5acdc3

  /pages/2/2fbb46d103e517b49f2acffd9d51b4b6

  /thumbs/00001.jpg

  /thumbs/00002.jpg

  /images/00001.jpg

  /images/00002.jpg

  document.pdf

 

For the sake of completeness you can include the PDF in the import path, but as of now there is no direct link in the interface to download this PDF. Use the DSpace link field.

...