Skip to content

Commit

Permalink
updating location creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnyu committed Jul 19, 2024
1 parent 018e9db commit dab189d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ $ aspace-export --config /path/to/go-aspace.yml --environment your-environment-k
* If the `validate` option is set when the running the application any finding aids that fail validation will be written to a subdirectory named `invalid`.
* 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.
* Validation of MARC21 records is currently failing, do not use the --marc flag in conjunction with the --validate flage


**example output structure**<br>
/path/top/eexport-location/aspace-exports-[timestamp]<br>
Expand All @@ -59,8 +57,7 @@ Command-Line Arguments
--reformat, tab-reformat ead files (marcxml are tab-formatted by ArchivesSpace), default: `false`<br>
--repository, ID of the repository to be exported, `0` will export all repositories, default: `0`<br>
--resource, ID of the resource to be exported, `0` will export all resources, default: `0`<br>
--timeout, client timout in seconds to, default: `20`<br>
--validate, validate exported finding aids against schema, default: `false`<br>
--timeout, client timeout in seconds to, default: `20`<br>
--version, print the application and go-aspace client version<br>
--workers, number of concurrent export workers to create, default: `8`<br>
--help, print this help screen<br>
Expand Down
11 changes: 2 additions & 9 deletions aspace_xport/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package aspace_xport
import (
"errors"
"fmt"
"github.com/nyudlts/go-aspace"
"io"
"os"
"path/filepath"

"github.com/nyudlts/go-aspace"
)

type ResourceInfo struct {
Expand Down Expand Up @@ -154,7 +155,6 @@ func CreateExportDirectories(workDirPath string, repositoryMap map[string]int, u

repositoryDir := filepath.Join(workDirPath, slug)
exportDir := filepath.Join(repositoryDir, "exports")
failureDir := filepath.Join(repositoryDir, "invalid")
unpublishedDir := filepath.Join(repositoryDir, "unpublished")

err := os.Mkdir(repositoryDir, 0755)
Expand All @@ -170,13 +170,6 @@ func CreateExportDirectories(workDirPath string, repositoryMap map[string]int, u
}
PrintAndLog(fmt.Sprintf("created export directory %s", exportDir), INFO)

//create the repository failure directory
err = os.Mkdir(failureDir, 0755)
if err != nil {
return err
}
PrintAndLog(fmt.Sprintf("created failure directory %s", failureDir), INFO)

if unpublishedResources == true {
err = os.Mkdir(unpublishedDir, 0755)
if err != nil {
Expand Down

0 comments on commit dab189d

Please sign in to comment.