You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-19Lines changed: 13 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ cd C:/Users/username/Desktop/aspace-wb-scripts
81
81
82
82
## Prepare necessary files
83
83
84
-
### Prepare media files (required)
84
+
### Prepare media files (highly recommended)
85
85
86
86
+ Copy your media files into ```files_to_upload```. Do NOT run the script directly on files in the Digital Library Staging Area.
87
87
+ Your files should be named according to [CDS guidelines](https://americanphilosophicalsociety.github.io/APS_digitization/metadata/#file).
@@ -101,38 +101,39 @@ If the collection you're ingesting already has a finding aid, you can follow the
101
101
102
102
This code provides you with a set of command line utilities that can be used to perform various Workbench-related tasks. These are designed to be used in sequence.
103
103
104
-
Some of these commands take optional **flags**, which give the scripts additional information about how to process your data. Flags are parameters like ```--fields``` or ```--filefolder``` that you can include in your commands, usually followed by some other piece of information such as a file name or variable. For more information and examples, see the sections below.
104
+
Some of these commands take optional **flags**, which give the scripts additional information about how to process your data. Flags are parameters like ```--fields``` or ```--files``` that you can include in your commands, usually followed by some other piece of information such as a file name or variable. For more information and examples, see the sections below.
105
105
106
-
### Create fillable spreadsheet (```wb-fillable``` or ```wb-blank```)
Creates a simplified version of a Workbench spreadsheet, with some data prepopulated. Data is pulled from media files, with the option to add additional data from an ArchivesSpace bulk update spreadsheet.
109
109
110
110
| Information | Acceptable input | Required? | Flag | Example
111
111
| --- | --- | --- | --- | --- |
112
-
| Workbench upload type |```book``` (an object with multiple pages) or ```single``` (a graphic, audio, or video object) | Yes || book |
112
+
| Workbench upload type |```book``` (an object with multiple pages) or ```single``` (a graphic, audio, video, or PDF object) | Yes || book |
113
113
| Fields to include | Name of a .csv file containing a list of fields to include. Omit the .csv extension. You can create your own custom list (see below) or use one of the preset options: ```example_minimum_book```, ```example_minimum_single```, ```cnairaudio```, ```cnairbook```, or ```cnairimage```. If no list of fields is specified, all valid Workbench fields will be included. | Recommended |```--fields```| example_minimum_book |
114
114
| Bulk update spreadsheet | Name (with .xlsx extension) of an adapted ArchivesSpace bulk update spreadsheet file | Recommended | ```--AS``` | update.xlsx
115
-
| Path to media folder | Location of the folder containing your media files. Only necessary if you haven't copied these files into ```/files_to_upload```. Use forward slashes and if any directory names contain spaces, surround them in quotes. | No |```--filefolder```| C:/Users/yshiroma/Desktop/"Files to Upload" |
115
+
| Path to media folder | Location of the folder containing your media files. Only necessary if you haven't copied these files into ```/files_to_upload```. Use forward slashes and if any directory names contain spaces, surround the path in quotes. | No |```--files```| "C:/Users/yshiroma/Desktop/Files to Upload" |
116
+
| Output blank sheet? | Use this flag if you want to create a blank Workbench sheet using only the specified fields and field descriptions. This flag does not take any input. | No |```--blank```||
116
117
117
118
Example command with minimum required information:
118
119
119
120
```bash
120
121
wb-fillable book
121
122
```
122
123
123
-
Example command with all flags:
124
+
Example command to use a custom set of fields, ArchivesSpace data, and file path:
124
125
125
126
```bash
126
-
wb-fillable book --fields fields_file --AS archivesspace_file.xlsx --filefolder C:/Users/username/Desktop/"Folder Name"
127
+
wb-fillable book --fields fields_file --AS archivesspace_file.xlsx --files "C:/Users/username/Desktop/Folder Name"
127
128
```
128
129
129
-
**To create a blank spreadsheet with a particular set of fields, without drawing any information from media files** run the following command:
130
+
Example command to create a blank spreadsheet from a particular set of fields, without drawing any information from media files or ArchivesSpace:
130
131
131
132
```bash
132
-
wb-blank book --fields fields_file
133
+
wb-fillable book --fields fields_file --blank
133
134
```
134
135
135
-
Check in ```/metadata``` that your output has been created successfully. It should be named ```output_wb-fillable```or ```output_wb-blank```, depending on which script you used (with 'output' replaced by the name of your ArchivesSpace bulk update sheet if you provided one).
136
+
Check in ```/metadata``` that your output has been created successfully. It should be named ```output_wb-fillable``` (with 'output' replaced by the name of your ArchivesSpace bulk update sheet if you provided one).
136
137
137
138
### Manually fill spreadsheet
138
139
@@ -143,7 +144,7 @@ Fill out the remaining fields according to standard Workbench guidelines, with a
143
144
+```id```, ```parent_id```, ```field_weight```, ```field_display_hints```, and ```field_metadata_title``` are omitted in ```output_wb_fillable``` because they will be filled in automatically later by ```wb-to-wb```
144
145
+ For any field marked "Fills down," you can fill in a value only once and it will be auto-filled to any blank cell below it in that column
145
146
+```field_language``` can be entered as an ISO639 language name or code
146
-
+```field_linked_agent``` is broken out into ```field_linked_agent_NAME```, ```field_linked_agent_ROLE```, and ```field_linked_agent_TYPE```, making it possible to enter these pieces of information separately. If there are multiple linked agents, entries should be pipe-separated.
147
+
+```field_linked_agent``` is broken out into ```field_linked_agent_NAME```, ```field_linked_agent_RELATOR```, and ```field_linked_agent_TYPE```, making it possible to enter these pieces of information separately. If there are multiple linked agents, entries should be pipe-separated.
147
148
148
149
For example, consider the following ```field_linked_agent``` entry from a standard Workbench sheet:
149
150
@@ -154,7 +155,7 @@ The examples below show how this same data would be entered into ```output_wb-fi
154
155
| Field | Description | Example |
155
156
| --- | --- | --- |
156
157
|```field_linked_agent_NAME```| Name, in Library of Congress subject heading format | Nussbaum, Martha, 1947-\|American Philosophical Society |
157
-
|```field_linked_agent_ROLE```| Relator code, from list of Default Relationship Types | cre\|pbl |
158
+
|```field_linked_agent_RELATOR```| Relator code, from list of Default Relationship Types | cre\|pbl |
158
159
|```field_linked_agent_TYPE```| Type of linked agent (```person```, ```corporate_body```, or ```family```), or an abbreviation (```p```, ```c```, or ```f```). If left blank, all entires are assumed to be persons. | person\|corporate_body |
159
160
160
161
@@ -256,13 +257,6 @@ Testing/sample data is currently lacking. This should include sample media for v
256
257
- There is currently no way to validate field entry against Islandora controlled vocabularies themselves unless they are explicitly downloaded into /vocabularies/ and code added to validate them (in ```wb-validate``` calling a function in utils/validate.py)
257
258
- Agents from ArchivesSpace must currently come from a custom report where the maximum (50k rows, we need something close to 80k) is overridden using the browser inspect tool. An API call could be an improvement. There is currently [a ticket](https://archivesspace.atlassian.net/browse/ANW-2376) with ArchivesSpace to include agents (and all subjects and all other fields) in the spreadsheet.
258
259
259
-
# To do
260
-
261
-
- Replace language vocabulary with one that uses ISO639-2B where different to ISO639-3 (~20 cases). Probably necessary to replace the json extraction with something that uses the ISO639 library. Alternatively, have an ISO639-2B vocabulary of these differences and reference that, as they are unlikely to change. Temporary fix was to just edit the iso639.csv file to use 2B for a few languages.
262
-
- To avoid duplication, the functionality of ```wb-blank``` (which is ```wb-fillable``` but bypassing any file metadata) could be incorporated into ```wb-fillable``` using a flag, e.g. --blank. This would require putting the file checking and metadata extraction into dedicated functions.
263
-
- After upgrade to ArchivesSpace v4, adapt Bulk Update Spreadsheet instructions and check for any discrepency between old and new sheets.
264
-
- reorder output of ```wb-create-dos``` so all AS-entry fields are to the right
265
-
266
260
# Contributing
267
261
268
262
This library is under active development and welcomes contributions. Please work from the existing issues before submitting a pull request.
raiseOSError(f"Workbench output CSV {str(NODES_FILE)} not found in folder {str(c.METADATA_DIR)}. Check file name and location and try again.")
26
-
27
-
print("... command line arguments okay ...")
25
+
raiseFileNotFoundError(f"Workbench output CSV {str(NODES_FILE)} not found in folder {str(c.METADATA_DIR)}. Check file name and location and try again.")
0 commit comments