Skip to content

Commit

Permalink
adding support for exporting marc records
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnyu committed Nov 23, 2021
2 parents 2c5402c + 803c139 commit 86008aa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
hello:
echo "Hello"

build:
go build -o aspace-export
zip aspace-export-linux-v$(version).zip aspace-export go-aspace.yml
mv aspace*.zip bin/linux
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
aspace-export
=============
Command-line utility to bulk export EAD finding aids from Archivespace.
Command-line utility for bulk export, validation and reformatting of EAD finding aids from Archivespace.

Install
-------
Expand All @@ -10,9 +10,10 @@ Install

Run
---
$ aspace-export --config /path/to/go-aspace.yml [options]
$ aspace-export --config /path/to/go-aspace.yml [options] 2> /dev/null
<br><br><b>note:</b> the underlying xml lib will output a lot of info about xml errors to stderr, `2> /dev/null` ignores the output but you can redirect to a file by replacing /dev/null

The program will create a directory heirarchy at the location set in the --location option. There will be a a subdirectory created for each repository that was exported, with the name of the repositories slug.
The program will create a directory hierarchy at the location set in the --export-location option. There will be a subdirectory created for each repository that was exported, with the name of the repositories slug.
within each repository directory there will be an `exports` directory containing all exported finding aids.
If the `validate` option was set when the program was run any finding aids that fail validation will be written to a subdirectory named `failures`.
A log file will be created named `aspace-export.log` which will be moved to the root of output directory at the end of the process, the initial location of this log file can be set with the `--logfile` option.
Expand Down Expand Up @@ -43,6 +44,6 @@ Command-Line Arguments
--marc, export marcxml files instead of ead, default: false<br>
--validate, validate exported finding aids against ead2002 schema, default: `false`<br>
--reformat, tab-reformat ead files, default: `false`<br/>
--export-location, path/to/the location to export finding aids, default: `aspace-exports`<br>
--export-location, path/to/the location to export finding aids, default: `./aspace-exports`<br>
--help, print this help screen<br>
--version, print the application and go-aspace client version
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (
version bool
reformat bool
marc bool
appVersion = "v0.2.0b"
appVersion = "v0.2.0-beta"
)

type ResourceInfo struct {
Expand Down Expand Up @@ -273,7 +273,6 @@ func cleanup() {
err = os.Rename(logfile, newLoc)
if err != nil {
fmt.Println(err.Error())
fmt.Printf("Could not move log file from /tmp to %s\n", workDir)
}

}

0 comments on commit 86008aa

Please sign in to comment.