Skip to content

Commit ef88eec

Browse files
committed
docs: usage update, rm defunct notes
1 parent 91cd836 commit ef88eec

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

collection-export/readme.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,35 @@ Download all (or a subset) of items from a VAULT collection. Each item becomes i
66

77
1. `pnpm install` or `npm install` dependencies
88
2. create an .apprc file with an OAuth token and the root URL of the openEQUELLA instance
9-
3. optionally edit the collection and filtering options you want into the .apprc
10-
4. edit the `itemToHTML` function in collect.js if you want to capture particular metadata fields
9+
3. optionally edit collection and filtering options into the .apprc
1110

1211
## Usage
1312

1413
```sh
15-
# most search parameters can be passed to the script to select which items
14+
node collect --help
15+
Usage: node collect.js [options]
16+
17+
Options:
18+
--collection <UUID> UUID of collection to export
19+
--html Write a brief HTML index for each item
20+
--item <UUID> UUID of single item to export
21+
--name Use item name for export folders instead of UUID
22+
--verbose Print debug info
23+
24+
You can also specify any valid EQUELLA search parameters such as "--status DRAFT,ARCHIVE" or "--modifiedBefore 2020-01-01".
25+
See https://vault.cca.edu/apidocs.do#operations-tag-Searching
1626
# a collection or item is required
1727
node collect --collection $UUID
18-
node collect --item $UUID
19-
# example of a more complicated search
28+
node collect --item $UUID --version 1
29+
# a more complicated search
2030
node collect --collection $UUID --status DRAFT,ARCHIVE --modifiedBefore 2020-01-01
2131
# download items into folders that use the items' titles
2232
node collect --collection $UUID --name
2333
# sub-collection of Libraries, note --where needs fully-specified /xml/... path
2434
node collect --collection 6b755832-4070-73d2-77b3-3febcc1f5fad --where "/xml/mods/relatedItem/title = 'Robert Sommer Mudflats Collection'"
2535
```
2636

27-
By default item folders are named after UUID and then version. The `--name` flag makes the folder's the item's title, but titles can be duplicative or absent. An integer is append to the folder name if it would collide with an existing folder (NOTE: not yet, but this is a planned development).
37+
By default item folders are named after UUID and then version. The `--name` flag makes the folder's the item's title, but titles can be duplicative or absent. An integer is append to the folder name if it would collide with an existing folder.
2838

2939
## Metadata Evaluation
3040

@@ -46,8 +56,6 @@ Attachments that reference URLs or other EQUELLA items are not downloaded but pr
4656
4757
## Testing
4858
49-
TODO I should write real tests for this.
50-
5159
```sh
5260
# single item test
5361
node collect --item 2e9ee5f7-9308-4d33-8b85-ba034e7015ae

0 commit comments

Comments
 (0)