« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/yaml.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r--src/data/yaml.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index d7acdbc0..c2bdc69a 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -733,6 +733,22 @@ export function parseAnnotatedReferences(entries, {
   });
 }
 
+export function parseArtwork({
+  dateFromThingProperty,
+  artistContribsFromThingProperty,
+  artistContribsArtistProperty,
+}) {
+  return (entry, {subdoc, Artwork}) =>
+    subdoc(Artwork, entry, {
+      bindInto: 'thing',
+      provide: {
+        dateFromThingProperty,
+        artistContribsFromThingProperty,
+        artistContribsArtistProperty,
+      },
+    });
+}
+
 // documentModes: Symbols indicating sets of behavior for loading and processing
 // data files.
 export const documentModes = {
@@ -1407,6 +1423,8 @@ export function linkWikiDataArrays(wikiData, {bindFind, bindReverse}) {
 
     ['artistData', [/* find, reverse */]],
 
+    ['artworkData', [/* find */]],
+
     ['flashData', [
       'wikiInfo',
     ]],