DSpace Simple Archives Importer is an utility that facilitates the importing of exported archive files into DSpace. This utility extracts, crosswalks metadata, makes DSpace Simple Archives and invokes DSpace script to import. This utility can be set up to run periodically to watch for new deposits and import as soon as possible.
- Python 2.7
- Pip
- BeautifulSoup4
- Python XML parser
- Clone the repository on the server running DSpace, or a space accessible by DSpace.
- Run
scripts/dspace_dsa_maker.py
The maker script will initiate working directories. The location of each working directory is specified in the two python scripts. The values can be adjusted as needed.
The utility looks for new zip archives in the deposit directory. All zip files in the deposit directory will be imported during one run of the scripts. If you are automating the utility, make sure the deposit directory has the right permission.
Invoke dspace_dsa_maker.py
and then dspace_dsa_ingest.py
- Extracts all zip archives in the deposit directory.
- For each extracted item, attempt to crosswalk the metadata XML into
dublin_core.xml
using the mapping defined incrosswalk()
indspace_dsa_maker.py
.
This mapping uses the terms defined in DSpace'sdc
schema in the metadata schema registry. - For each, make the DSpace Simple Archive by combining the crosswalked
dublin_core.xml
, the list of bitstreams found in the zip archive, and thecontents
file, required by DSpace to distinguish bitstreams. - Put each finished DSpace Simple Archive directory into a parent directory corresponding to an existing collection in DSpace. The collection is derived from the filename of each zip archive.
- Invoke DSpace's own import script on each collection directory, importing each DSpace Simple Archive into DSpace.
- Move all files from deposit and ingest directories into the archive directories for backup.
- Send email notifications, listing the filenames that were processed during the current run.
University of Toronto Libraries ([email protected])
DSpace Simple Archives Importer is licensed under Apache License 2.0.