<%# index.ejs — ATOM Feed Generator Expects: data.vods = [{ id, title, notes, thumbnail, streamDate, expand }] %> <% response.header("Content-Type", "application/atom+xml"); // Build Atom XML as a string let atom = ` Futureporn.net VODs ${new Date().toISOString()} ${env('ORIGIN')} CJ_Clippy cj@futureporn.net `; for (const vod of data.vods) { const url = `${env('ORIGIN')}/vods/${vod.get('id')}`; const entryTitle = ((vod?.expand?.vtubers?.map(vt => vt.displayName) || []).join(', ') || vod.get('streamDate')); atom += ` <![CDATA[${((vod?.get('expand')?.vtubers?.map(vt => vt.get('displayName')) || []).join(', ') || vod.get('streamDate'))}]]> ${url} ${vod.get('updated')}`; if (vod.get('notes')) { atom += ` `; } if (vod.get('thumbnail')) { atom += ` ]]>`; } atom += ` `; } atom += ` `; // Send the Atom feed response.html(200, atom); %>