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
console.log(' --item <UUID> UUID of single item to export')
30
32
console.log(' --name Use item name for export folders instead of UUID')
31
33
console.log(' --no-mods Do not write strict MODS XML for each item')
34
+
console.log(' --syllabus Convert courseInfo syllabus metadata to MODS')
32
35
console.log(' --verbose Print debug info')
33
36
console.log('\nYou can also specify any valid EQUELLA search parameters such as "--status DRAFT,ARCHIVE" or "--modifiedBefore 2020-01-01".\nSee https://vault.cca.edu/apidocs.do#operations-tag-Searching')
34
37
process.exit(0)
@@ -188,8 +191,19 @@ function getAttachments(item, itemDir) {
188
191
functionwriteXML(item,dir){
189
192
debug(`Writing XML metadata for item ${item.links.view}`)
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.
The `test-collection-samples.js` script tests random samples of XML metadata from exported EQUELLA JSON files against the strict-mods library to verify conversions work correctly. We can also download item XML to run the strict MODS conversion on our own.
102
105
103
-
## Syllabus Conversion
106
+
## Syllabus Metadata Conversion
104
107
105
-
The syllabus.js file converts XML metadata from CCA's "courseInfo" schema to standards-compliant MODS. It can be used as a library or passed a single XML file on the command line; it will print the converted MODS to stdout.
108
+
The syllabus.js file converts XML metadata from CCA's "courseInfo" schema to standards-compliant MODS. It can be used as a library or passed a single XML file on the command line; it will print the converted MODS to stdout. `npm run sylxmltest` runs the test suite.
106
109
107
-
TODO: add `--syllabus` flag to collect.js to convert syllabus XML to MODS.
110
+
Running `node collect` with the `--syllabus` flag will automatically convert syllabus XML to MODS for any items in the collection that have a syllabus attachment.
0 commit comments