Created
September 21, 2021 11:49
-
-
Save fuzheado/fb5e26ae68d16dab4d71b53275b290b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- # Config file for Wiki API Connector. Make sure there are no TAB characters in this YAML file! | |
units: | |
- unit: | |
name: Smithsonian American Art Museum | |
api: | |
api_url: https://api.si.edu/openaccess/api/v1.0/content/edanmdm:{}?api_key={} | |
api_key: true | |
api_key_info: https://api.data.gov/signup/ | |
api_key_string: TKTKTKTK # This needs to be filled in or brought in as a secret | |
fields: [identifier, api_key_string] | |
generic: | |
permission: | |
jsonpath: $.response.content.descriptiveNonRepeating.metadata_usage.access | |
values: [CC0] | |
commons_template: | |
url: https://commons.wikimedia.org/wiki/Template:Artwork | |
selector_path: [jsonpath, static, append] # And append | |
crosswalk: # Hard mappings | |
permission: | |
CC0: "{{CC-zero}}" | |
category: # TODO: Need to implement this | |
object type: | |
Paintings: Paintings in the Smithsonian American Art Museum | |
Sculpture (visual work): Sculptures in the Smithsonian American Art Museum | |
fields: | |
_image: | |
jsonpath: $.response.content.descriptiveNonRepeating.online_media.media[*].resources[?(@.label == 'High-resolution JPEG')].url | |
title: | |
jsonpath: $.response.title | |
accession number: | |
jsonpath: $.response.content.freetext.identifier[?(@.label == 'Object number')].content | |
artist: | |
jsonpath: $.response.content.indexedStructured.name[*] | |
action: reconcile | |
object type: | |
jsonpath: $.response.content.indexedStructured.object_type[*] | |
description: | |
static: "object from SAAM" | |
date: | |
jsonpath: $.response.content.indexedStructured.date[*] | |
medium: | |
jsonpath: $.response.content.freetext.physicalDescription[?(@.label == 'Medium')].content | |
dimensions: | |
jsonpath: $.response.content.freetext.physicalDescription[?(@.label == Dimensions)].content | |
institution: | |
static: "{{Institution:Smithsonian American Art Museum}}" | |
department: | |
jsonpath: $.response.content.freetext.setName[?(@.label == 'Department')].content | |
credit line: | |
jsonpath: $.response.content.freetext.creditLine[?(@.label == 'Credit Line')].content | |
source: | |
jsonpath: $.response.content.descriptiveNonRepeating.record_link | |
append: "{{SAAM-cooperation}}" | |
permission: | |
jsonpath: $.response.content.descriptiveNonRepeating.online_media.media[*].usage.access | |
commons_wikibase: | |
selector_path: [jsonpath, static] # And append | |
statements: # TODO: maybe change this to fields to be consistent with above | |
P4765: # Commons compatible at URL | |
jsonpath: $.response.content.descriptiveNonRepeating.online_media.media[*].resources[?(@.label == 'High-resolution JPEG')].url | |
P275: | |
static: Q6938433 # CC0 copyright license | |
P6216: | |
static: Q88088423 # dedicated to the public domain by copyright holder | |
P4704: # SAAM object number, takes URL then finds substrings after ? and = | |
jsonpath: $.response.content.descriptiveNonRepeating.record_link.`split(?, 1, -1)`.`split(=, 1, -1)` | |
P7851: | |
jsonpath: $.response.content.descriptiveNonRepeating.record_ID # Smithsonian resource ID | |
P9473: | |
jsonpath: $.response.content.descriptiveNonRepeating.guid.`split(/, 1, -1)` # Smithsonian ARK ID | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment