Last active
June 7, 2022 21:36
-
-
Save hermanbanken/349f69a4df6eb46841f97fa9fec0b188 to your computer and use it in GitHub Desktop.
Music concert generation of overlay slides
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
slides.html | |
slides.pdf |
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
#!/usr/bin/env node | |
const playlist = require("fs").readFileSync("Playlist Excelsior Havendagen 2022 - Blad1.tsv", { encoding:"utf8"}).split("\n").map((line) => { | |
const [title, artist] = line.split("\t"); | |
return {title:title.trim(), artist: artist.trim()}; | |
}).filter(({ title, artist}) => title || artist); | |
const frame = ` | |
<html> | |
<link ref="stylesheet" href="style.css" type="text/css" /> | |
SLIDES | |
</html> | |
`; | |
function escapeHtml(unsafe) | |
{ | |
return unsafe | |
.replace(/&/g, "&") | |
.replace(/</g, "<") | |
.replace(/>/g, ">") | |
.replace(/"/g, """) | |
.replace(/'/g, "'"); | |
} | |
const html = frame.replace("SLIDES", playlist.map(({ title, artist }) => `<div class='slide'><div class='box'><div class='title'>${escapeHtml(title)}</div><div class='artist'>${escapeHtml(artist)}</div></div></div>`).join("\n")); | |
process.stdout.write(html); |
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
Gonna Fly Now | Excelsior (o.l.v. Hans van Hees) | |
---|---|---|
Alberti Medley | Excelsior (en combo), Elize Verlaan, Martine Zuidam, Ben Pernot en Peter Ravensberg | |
The Show Must Go On | Excelsior, Elsa van Dam (trompet) (en/of Lianne de Vries en/of Menno Hordijk) | |
I just can stop loving you | Excelsior, Elize Verlaan en Peter Ravensberg | |
Symphonic Highlights of Frozen | Excelsior (o.l.v. Hans van Hees) | |
African Beat | Excelsior, Harrie Banken (trompet), Rob Hofman (trombone), Lindsey en Elyse (dans) | |
Flower Duet (uit Lakmé) | Excelsior, Cora den Oudsten (sopraan), Elena Bazhenova (mezzosopraan), Lindsey en Elyse (bloemenmeisjes) | |
Conquest of Paradise | Excelsior en Woerdens Promskoor (o.l.v. Anna Kok) | |
Rondo | Excelsior | |
Video 'De Oude Hollandse Waterlinie in vogelvlucht' | ||
Trumpet Voluntary | Excelsior en Arjen Jansen (trompet) | |
Hymne to the Fallen | Excelsior en Woerdens Promskoor | |
Nessun Dorma | Excelsior en Cora den Oudsten (sopraan) | |
Het Woerdens Loflied | Excelsior, Ben Pernot, Woerdens Promskoor en solisten | |
Promslied | Woerdens Promskoor (o.l.v. Anna Kok) en René van de Hoef (piano) | |
Arcade | Solisten Sofie de Bruijn en Sem Hoos en pianist René van de Hoef | |
Avengers Suite | Excelsior (o.l.v. Hans van Hees) | |
O Fortuna | Excelsior en Woerdens Promskoor | |
Trumpet Fiësta | Excelsior en trompettisten Arjen, Harrie, Menno, Elsa en Lianne | |
Birds | Excelsior en Martine Zuidam | |
The Prayer | Excelsior, Sofie de Bruijn en Peter Ravensberg | |
Bella Ciao | Excelsior en Woerdens Promskoor | |
Roller Coaster | Excelsior, Peter Ravensberg (zang) en Peter Hoos (gitaar) | |
Leef | Excelsior, Sem Hoos (zang), Ben Pernot (oude wijze man), Martine, Sofie, Peter en Promskoor (backing vocals) | |
My heart will go on | Excelsior en Sofie de Bruijn | |
Everybody needs somebody | Excelsior, Elize Verlaan, Sem Hoos en Promskoor | |
Gouden Kazenlied | Excelsior en Woerdens Promskoor (en publiek) | |
Memory | Excelsior, Woerdens Promskoor en René van de Hoef (piano) | |
We'll meet again | Excelsior, Martine Zuidam (solo intro), solisten en Woerdens Promskoor | |
Zij gelooft in mij | Excelsior en Peter Ravensberg | |
The Rose | Excelsior, Elize Verlaan en Martine Zuidam | |
Trini Lopez Medley | Excelsior, Bastiaan Sparnaay, Peter Ravensberg, Sem Hoos en overige solisten | |
Amsterdamse Grachten | Excelsior, Peter Ravensberg, Bastiaan Sparnaay, overige solisten en Woerdens Promskoor |
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
./csv-to-html.js > slides.html | |
prince slides.html && open slides.pdf |
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
@page { | |
size: 1920px 1080px; | |
background-color: #04F404; | |
margin: 0; | |
} | |
.slide { | |
break-before: page; | |
/* min-width: 1920px; | |
min-height: 1080px; */ | |
} | |
.box { | |
position: absolute; | |
bottom: 0; | |
width: 100vw; | |
background: white; | |
padding: 4vh 4vw 6vh; | |
} | |
.title, .artist { | |
display: block; | |
/* border-bottom: 1px solid black; */ | |
width: 96vw; | |
font-size: 5vh; | |
line-height: 5vh; | |
text-overflow: ellipsis; | |
word-wrap: break-word; | |
font-family: Helvetica, sans-serif; | |
} | |
.artist { | |
font-size: 3vh; | |
line-height: 120%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment