openvibers/openvibe.report Commits
An after-show report names the channel by its @handle (#179)
Changes
@@@ -537,7 +537,7 @@ function recap({ recap: d } = {}) {const takes = (r.takes || []).filter((t) => t && t.title).sort((a, b) => (n(a.sec) ?? 1e9) - (n(b.sec) ?? 1e9)).slice(0, 8);const at = (sec) => (vod && vod.id && n(sec) != null ? `https://openvibe.video/v/${encodeURIComponent(vod.id)}?t=${Math.max(0, Math.floor(Number(sec)))}` : null);const body = `<header class="rp-page-h rp-recap-h"><p class="rp-kicker">After-show report</p><h1>${esc(w.headline || s.title || 'Stream')}</h1>--<p class="rp-meta">${kit.mark({ name: who(u), src: u.avatar_url, size: 28 })} <a href="https://openvibe.live/@${encodeURIComponent(u.username || '')}">${esc(who(u))}</a>${s.title && w.headline ? ` · ${esc(s.title)}` : ''}${s.started_at ? ` · ${esc(dayTime(s.started_at))}` : ''}${n(s.duration_seconds) ? ` · ${esc(mins(s.duration_seconds))}` : ''}</p>++<p class="rp-meta">${kit.mark({ name: who(u), src: u.avatar_url, size: 28 })} <a href="https://openvibe.live/@${encodeURIComponent(u.username || '')}">@${esc(u.username || '')}</a>${s.title && w.headline ? ` · ${esc(s.title)}` : ''}${s.started_at ? ` · ${esc(dayTime(s.started_at))}` : ''}${n(s.duration_seconds) ? ` · ${esc(mins(s.duration_seconds))}` : ''}</p>${w.summary ? `<p class="rp-summary">${esc(w.summary)}</p><p class="rp-meta">${AI}</p>` : ''}</header><section class="rp-tiles" aria-label="The stream in numbers">${tile('Peak viewers', n(s.peak_viewers) != null ? exact(s.peak_viewers) : null, v.peak_at ? esc(dayTime(v.peak_at)) : '')}@@@ -17,7 +17,7 @@ const { boot, check, done, defaults } = require('./helpers/boot');['/rundown/t/seattle', ['Seattle', 'A headline', 'A take']],['/rundown/e/7', ['A written-up stream', 'The logline.', 'A segment']],['/rundown/s/goosely', ['goosely', 'A written-up stream', 'Seattle']],-- ['/after-show/7', ['Seattle Today', 'After-show report']],++ ['/after-show/7', ['Seattle Today', 'After-show report', '>@goosely</a>']],['/c/goosely', ['goosely', 'Seattle Today', 'A tiny but mighty vibe', 'Grade A']],];for (const [path, expected] of pages) {
@@ -537,7 +537,7 @@ function recap({ recap: d } = {}) {
@@ -537,7 +537,7 @@ function recap({ recap: d } = {}) {
const takes = (r.takes || []).filter((t) => t && t.title).sort((a, b) => (n(a.sec) ?? 1e9) - (n(b.sec) ?? 1e9)).slice(0, 8);
const takes = (r.takes || []).filter((t) => t && t.title).sort((a, b) => (n(a.sec) ?? 1e9) - (n(b.sec) ?? 1e9)).slice(0, 8);
const at = (sec) => (vod && vod.id && n(sec) != null ? `https://openvibe.video/v/${encodeURIComponent(vod.id)}?t=${Math.max(0, Math.floor(Number(sec)))}` : null);
const at = (sec) => (vod && vod.id && n(sec) != null ? `https://openvibe.video/v/${encodeURIComponent(vod.id)}?t=${Math.max(0, Math.floor(Number(sec)))}` : null);
const body = `<header class="rp-page-h rp-recap-h"><p class="rp-kicker">After-show report</p><h1>${esc(w.headline || s.title || 'Stream')}</h1>
const body = `<header class="rp-page-h rp-recap-h"><p class="rp-kicker">After-show report</p><h1>${esc(w.headline || s.title || 'Stream')}</h1>
-<p class="rp-meta">${kit.mark({ name: who(u), src: u.avatar_url, size: 28 })} <a href="https://openvibe.live/@${encodeURIComponent(u.username || '')}">${esc(who(u))}</a>${s.title && w.headline ? ` · ${esc(s.title)}` : ''}${s.started_at ? ` · ${esc(dayTime(s.started_at))}` : ''}${n(s.duration_seconds) ? ` · ${esc(mins(s.duration_seconds))}` : ''}</p>
+<p class="rp-meta">${kit.mark({ name: who(u), src: u.avatar_url, size: 28 })} <a href="https://openvibe.live/@${encodeURIComponent(u.username || '')}">@${esc(u.username || '')}</a>${s.title && w.headline ? ` · ${esc(s.title)}` : ''}${s.started_at ? ` · ${esc(dayTime(s.started_at))}` : ''}${n(s.duration_seconds) ? ` · ${esc(mins(s.duration_seconds))}` : ''}</p>
${w.summary ? `<p class="rp-summary">${esc(w.summary)}</p><p class="rp-meta">${AI}</p>` : ''}</header>
${w.summary ? `<p class="rp-summary">${esc(w.summary)}</p><p class="rp-meta">${AI}</p>` : ''}</header>
<section class="rp-tiles" aria-label="The stream in numbers">
<section class="rp-tiles" aria-label="The stream in numbers">
${tile('Peak viewers', n(s.peak_viewers) != null ? exact(s.peak_viewers) : null, v.peak_at ? esc(dayTime(v.peak_at)) : '')}
${tile('Peak viewers', n(s.peak_viewers) != null ? exact(s.peak_viewers) : null, v.peak_at ? esc(dayTime(v.peak_at)) : '')}
@@ -17,7 +17,7 @@ const { boot, check, done, defaults } = require('./helpers/boot');
@@ -17,7 +17,7 @@ const { boot, check, done, defaults } = require('./helpers/boot');
['/rundown/t/seattle', ['Seattle', 'A headline', 'A take']],
['/rundown/t/seattle', ['Seattle', 'A headline', 'A take']],
['/rundown/e/7', ['A written-up stream', 'The logline.', 'A segment']],
['/rundown/e/7', ['A written-up stream', 'The logline.', 'A segment']],
['/rundown/s/goosely', ['goosely', 'A written-up stream', 'Seattle']],
['/rundown/s/goosely', ['goosely', 'A written-up stream', 'Seattle']],
- ['/after-show/7', ['Seattle Today', 'After-show report']],
+ ['/after-show/7', ['Seattle Today', 'After-show report', '>@goosely</a>']],
['/c/goosely', ['goosely', 'Seattle Today', 'A tiny but mighty vibe', 'Grade A']],
['/c/goosely', ['goosely', 'Seattle Today', 'A tiny but mighty vibe', 'Grade A']],
];
];
for (const [path, expected] of pages) {
for (const [path, expected] of pages) {