views
dates = recordings.reduce((acc, v) => {acc[v.displayName.slice(5)] = v.id; return acc}, {})
[...document.querySelectorAll('table.mw-collapsible')].slice(1)
.map(table => ({
node: table,
rows: [...table.querySelectorAll('tr')]
.map(tr => {
try {
const id = [...tr.children].toReversed()[0].innerText.slice(1)
const date = dates[id]
const gif = tr.querySelector('img').src
const caption = tr.children[0].innerText ? (tr.children[0].innerHTML.trim() + "\n\n") : ""
const gaq = `https://view.gaq9.com/api/view/video/${date}`
// return {id, date, caption}
return `## \\#${id}: ${date}\n\n${caption}\n\n<${gaq}>\n`
} catch (e) { console.error(e); return "`" + tr.innerHTML + "``"}
}),
title: table.querySelector('caption').childNodes[0].textContent.trim()
})) // [0]
.map(o => `# ${o.title.replace(/[:#]/g, '')}\n\n${o.rows.join('\n')}`)
.join('\n')
Normal: https://gaq9.com/view.html?recording=277&mode=frames&random=3077 Processed: https://gaq9.com/view.html?recording=277&mode=frames&processed=true&random=3077
Normal: https://gaq9.com/view.html?recording=276&mode=frames&random=1232 Processed: https://gaq9.com/view.html?recording=276&mode=frames&processed=true&random=1232
#todo shadow cone following the Utah Teapot?