From a6e2493f13636f8586fd177dd493812bbcb09dbd Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 24 Apr 2024 11:14:38 -0300 Subject: data, yaml: basic who/what -> artist/annotation --- src/data/yaml.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/data/yaml.js') diff --git a/src/data/yaml.js b/src/data/yaml.js index 86f30143..5026a97e 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -393,7 +393,16 @@ export function parseContributors(contributionStrings) { return contributionStrings.map(item => { if (typeof item === 'object' && item['Who']) - return {who: item['Who'], what: item['What'] ?? null}; + return { + artist: item['Who'], + annotation: item['What'] ?? null, + }; + + if (typeof item === 'object' && item['Artist']) + return { + artist: item['Artist'], + annotation: item['Annotation'] ?? null, + }; if (typeof item !== 'string') return item; @@ -401,8 +410,8 @@ export function parseContributors(contributionStrings) { if (!match) return item; return { - who: match.groups.main, - what: match.groups.accent ?? null, + artist: match.groups.main, + annotation: match.groups.accent ?? null, }; }); } -- cgit 1.3.0-6-gf8a5