diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-04-24 11:14:38 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-04-24 11:14:38 -0300 |
commit | 8dc4763384100c8f126577586ec34e09aa47fe14 (patch) | |
tree | 4612c1cfbbad380d5c2bcf1f1419dae06e0744a7 /src/data/yaml.js | |
parent | 716798ebdad95fcc5670228917ff2ef92c82ee25 (diff) |
data, yaml: basic who/what -> artist/annotation
Diffstat (limited to 'src/data/yaml.js')
-rw-r--r-- | src/data/yaml.js | 15 |
1 files changed, 12 insertions, 3 deletions
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, }; }); } |