« get me outta code hell

ancestral, etc! - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-06-04 15:12:18 -0300
committerFlorrie <towerofnix@gmail.com>2020-06-04 15:12:18 -0300
commit875bab24546ede8781e03557e51481e2405162a9 (patch)
tree2187aa62bc3c3f5c7ce15d0ccb7275e88c94477a /upd8.js
parentb21e5b5521cad7f38b93e2f41bf5d3c30eb8298c (diff)
ancestral, etc!
Diffstat (limited to 'upd8.js')
-rw-r--r--upd8.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/upd8.js b/upd8.js
index d22f1be..87f89b7 100644
--- a/upd8.js
+++ b/upd8.js
@@ -1424,13 +1424,13 @@ function writeListingPages() {
                             .map(([ album, ...tracks ]) => fixWS`
                                 <h2 id="${album.directory}"><a href="${C.ALBUM_DIRECTORY}/${album.directory}/index.html" style="${getThemeString(album.theme)}">${album.name}</a></h2>
                                 ${album.commentary && fixWS`
-                                    <blockquote>
+                                    <blockquote style="${getThemeString(album.theme)}">
                                         ${transformMultiline(album.commentary)}
                                     </blockquote>
                                 `}
                                 ${tracks.filter(t => t.commentary).map(track => fixWS`
                                     <h3 id="${track.directory}"><a href="${C.TRACK_DIRECTORY}/${track.directory}/index.html" style="${getThemeString(album.theme)}">${track.name}</a></h3>
-                                    <blockquote>
+                                    <blockquote style="${getThemeString(album.theme)}">
                                         ${transformMultiline(track.commentary)}
                                     </blockquote>
                                 `).join('\n')}
@@ -1651,6 +1651,7 @@ function fancifyURL(url, {album = false} = {}) {
         url.includes('tumblr.com') ? 'Tumblr' :
         url.includes('twitter.com') ? 'Twitter' :
         url.includes('deviantart.com') ? 'DeviantArt' :
+        url.includes('wikipedia.org') ? 'Wikipedia' :
         new URL(url).hostname
     }</a>`;
 }
@@ -1921,20 +1922,24 @@ async function main() {
                 buffer = [];
             }
         };
+        const showWhere = name => {
+            const where = justEverythingMan.filter(thing => [...thing.coverArtists || [], ...thing.contributors || []].some(({ who }) => who === name) || [...thing.artists || []].includes(name));
+            for (const thing of where) {
+                console.log(`\x1b[31m- ` + (thing.album ? `(\x1b[1m${thing.album.name}\x1b[0;31m)` : '') + ` \x1b[1m${thing.name}\x1b[0m`);
+            }
+        };
         let CR4SH = false;
         for (let name of artistNames) {
             const entry = artistData.find(entry => entry.name === name);
             if (!entry) {
                 clearBuffer();
                 console.log(`\x1b[31mMissing entry for artist "\x1b[1m${name}\x1b[0;31m"\x1b[0m`);
+                showWhere(name);
                 CR4SH = true;
             } else if (entry.alias) {
                 clearBuffer();
                 console.log(`\x1b[31mArtist "\x1b[1m${name}\x1b[0;31m" should be named "\x1b[1m${entry.alias}\x1b[0;31m"\x1b[0m`);
-                const where = justEverythingMan.filter(thing => [...thing.coverArtists || [], ...thing.contributors || []].some(({ who }) => who === name));
-                for (const thing of where) {
-                    console.log(`\x1b[31m- ` + (thing.album ? `(\x1b[1m${thing.album.name}\x1b[0;31m)` : '') + ` \x1b[1m${thing.name}\x1b[0m`);
-                }
+                showWhere(name);
                 CR4SH = true;
             } else {
                 buffer.push(entry);