Skip to content

Commit

Permalink
updating readme and help message
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnyu committed Jul 13, 2021
1 parent f02b46d commit 5a2fdf1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ Install
-------
1. download the latest binary for Mac or linux
2. decompress the zip file
3. Enter your ArchivesSpace credentials into the go-aspace.yml file, and move to any location on your system
4. move the binary to your system path, e.g. `$ sudo mv aspace-export /usr/local/bin`
3. Enter your ArchivesSpace credentials into the go-aspace.yml file

Run
---
$ aspace-export [options]
$ aspace-export --config /path/to/go-aspace.yml [options]

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.
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`
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.


**example output structure**<br>
aspace-exports<br>
Expand All @@ -28,17 +29,19 @@ aspace-exports<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tam_003.xml<br>

**note**</br>
* The program currently uses a resource's `eadid` to create a filename, if the resource does not have an eadid it will be skipped and marked in the logfile.<br>
* The program currently uses a resource's `eadid` to create a filename, if the resource's eadid is blank it will be skipped and marked in the logfile.<br>
* The program currently only exports resources that have a `Publish` value set to `true`<br>

Command-Line Arguments
----------------------
--config, path/to/go-aspace.yml configuration file, required<br>
--logfile, path/to/the logfile to be created, default `aspace-export.log`<br>
--environment, environment key in config file of the instance to export from, default: `dev`<br>
--repository, ID of the repsoitory to be exported, `0` will export all repositories, default: 0<br>
--timeout, client timout in seconds to, default: 20<br>
--workers, number of concurrent export workers to create, default: 8<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>
--help, print this help screen<br>
--version, print the application and go-aspace client version
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ func printHelp() {
fmt.Println("usage: aspace-export [options]")
fmt.Println("options:")
fmt.Println(" --config path/to/the go-aspace configuration file default `go-aspace.yml`")
fmt.Println(" --logfile path/to/the logfile default `aspace-export.log`")
fmt.Println(" --environment environment key in config file of the instance to export from default `dev`")
fmt.Println(" --repository ID of the repository to be exported, `0` will export all repositories default 0 -- ")
fmt.Println(" --timeout client timout in seconds to default 20")
fmt.Println(" --workers number of concurrent export workers to create default 8")
fmt.Println(" --validate validate exported finding aids against ead2002 schema default `false`")
fmt.Println(" --reformat tab reformat ead xml files default `false`")
fmt.Println(" --export-location path/to/the location to export finding aids default `aspace-exports`")
fmt.Println(" --help print this help screen")
fmt.Println(" --version print the version and version of client version")
Expand Down

0 comments on commit 5a2fdf1

Please sign in to comment.