-
Notifications
You must be signed in to change notification settings - Fork 35
Home
Simple Archive Format Builder, SAFBuilder, is a tool to package your content into a form suitable for batch import into DSpace.
INPUT: Directory containing CSV with metadata, and files. OUTPUT: Simple Archive Format package
To get started, read the README. https://github.com/peterdietz/SAFBuilder/blob/master/README
Getting Started / Installing on: Linux or Windows
There is also a Usage Guide on Simple Archive Format Packager at Duraspace.
git clone git://github.com/peterdietz/SAFBuilder.git
cd SAFBuilder
./recompile.sh
./safbuilder.sh
It should return the usage syntax:
USAGE: BatchProcess /path/to/directory metadatafilename.csv
Hint -- directory: Use absolute path and no trailing slashes
Hint -- metadatafilename: needs to be in the directory, as do the content files
./safbuilder.sh /path/to/SAFBuilder/src/edu/osu/kb/sample_data AAA_batch-metadata.csv
This should then run the SAFBuilder over the included SampleData that came with this package. You can then inspect the SimpleArchiveFormat directory that was created, and that would then be suitable input for batch import to DSpace.
Here is the syntax of importing SAF Packages into DSpace using ItemImport. Basic-DSpace-Import-Process
sudo /dspace/bin/dspace import -a
-e [email protected]
-c 1811/49710
-s /home/peterdietz/Desktop/MelanieSeedsBatch/SimpleArchiveFormat/
-m /home/peterdietz/Desktop/MelanieSeedsBatch/seedsbatch1.map
If you have multiple files/bitstreams for one item, you can separate each filename with a double pipe || to have multiple files.
You specify files for content bundles by having a header of "filename". You can also specify files that they should be sent to a specified bundle with "filename__bundle:BUNDLENAME", where BUNDLENAME is whatever you want. This might be for when you have to upload files that are not destined for public consumption. An example use case is for uploading custom proxy licenses that are PDF's that don't go into the system license bundle. The SAFBuilder will automatically add the tab separator.
The import tool additionally allows the following as extra parameters for a file.
bundle:BUNDLENAME
permissions:PERMISSIONS
description:DESCRIPTION
primary:true
BUNDLENAME is the name of the bundle to which the bitstream should be added. Without specifying the bundle, items will go into the default bundle, ORIGINAL.
PERMISSIONS is text with the following format: -[r|w] 'group name'
DESCRIPTION is text of the files description.
Primary is used to specify the primary bitstream.
In SAFBuilder, you can use these by separating them with double underscore. An example would be:
filename__bundle:MySpecialBundle__primary:true__description:Something really cool