Command-line utility for bulk export, validation and reformatting of EAD finding aids and MARC records from Archivespace.
- Download the latest binary for Mac or linux https://github.com/nyudlts/aspace-export/releases/tag/v1.0.1b
- Enter your ArchivesSpace credentials into the go-aspace.yml file included in the zip.
$ go install github.com/nyudlts/aspace-export
Pre-requisite: libxml2 and libxml2 development headers
$ make build
$ sudo make install //installs aspace-export to /usr/local/bin
$ make package VERSION="release version" OS="osx,linux", this will build the app, zip the app, the sample go-aspace.yml file and the readme into a zip located in the /bin directory
example: $ make package VERSION="v1.0.0b" OS="linux", this will create /bin/linux/aspace-export-linux-v1.0.0b.zip
$ aspace-export --config /path/to/go-aspace.yml --environment your-environment-key --format ead-or-marc [options]
notes:
- The underlying C xml lib, libxml2, will output voluminous, and not always helpful, info about xml errors to stderr,
2> /dev/null
ignores the output, you can redirect to a file by replacing /dev/null if you want to analyze the libxml2 output - The program will create a directory hierarchy at the location set in the --export-location option named `aspace-export-[timestamp]. A subdirectory will be created for each repository that was exported, with the name of the repository's slug.
- Within each repository directory there will be an
exports
directory containing all exported finding aids and afailures
directory for any file that fails to export from ArchivesSpace - If the
validate
option is set when the running the application any finding aids that fail validation will be written to a subdirectory namedinvalid
. - A log file will be created named
aspace-export.log
which will be created in the root of output directory as defined in the --export-location option. - A Report with statistics will be created named
aspace-export-report.txt
will be created in the root of output directory as defined in the --export-location option.
example output structure
/path/top/eexport-location/aspace-exports-[timestamp]
aspace-exports.log
aspace-exports-report.txt
/tamwag
/exports
tam_001.xml
tam_002.xml
/invalid
tam_003.xml
/failures
tam_004.xml
--config, path/to/go-aspace.yml configuration file, required
--environment, environment key in config file of the instance to export from, required
--export-location, path/to/the location to export resources, default: .
--format, format of export: ead or marc, default: ead
--include-unpublished-resources, include unpublished resources in exports, default: false
--include-unpublished-notes, include unpublished notes in exports, default: false
--reformat, tab-reformat ead files (marcxml are tab-formatted by ArchivesSpace), default: false
--repository, ID of the repository to be exported, 0
will export all repositories, default: 0
--resource, ID of the resource to be exported, 0
will export all resources, default: 0
--timeout, client timeout in seconds to, default: 20
--version, print the application and go-aspace client version
--workers, number of concurrent export workers to create, default: 8
--help, print this help screen
- no errors
- could not create a log file to write to
- mandatory options not set
- the location set at export-location set does not exist or is not a directory
- go-aspace library could not create an aspace-client
- could not get a list of repositories from ArchivesSpace
- could not get a list of resources from ArchivesSpace
- could not create a aspace-export directory at the location set at --export-location
- could not create subdirectories in the aspace-export