Public
Back
Version 12
12/5/2023
import { Hono } from "https://deno.land/x/hono@v3.11.1/mod.ts";
import { getLastPubDate } from "https://esm.town/v/vladimyr/getLastPubDate?v=14";
import { badgen as createBadge } from "npm:badgen@3.2.3";
import friendlyTime from "npm:friendly-time@1.1.1";
const app = new Hono();
app.get("/", async c => {
const rssUrl = new URL(c.req.query("q"));
const pubDate = await getLastPubDate(rssUrl);
const svg = createBadge({
label: "last episode",
status: friendlyTime(pubDate),
});
c.header("Content-Type", "image/svg+xml");
c.body(svg);
});
vladimyr-podcastbadge.web.val.run
Updated: December 6, 2023