1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchImageAsBase64(url) {
4 const response = await fetch(url);
5 const blob = await response.blob();
3export const dighimapperGcpCount = (async () => {
4 const url =
5 "https://annotations.allmaps.org/maps?imageservicedomain=images.dighimapper.eu";
6 const reponse = await fetch(url);
7 const annotations = await reponse.json();
4export async function sendRandomChihuahuaToSlack() {
5 const dogAPIURL = new URL(
6 "https://dog.ceo/api/breed/chihuahua/images/random",
7 );
8 const dogApiResp = await fetch(dogAPIURL.href);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const textToImageDalle = async (
4 openAIToken: string,
5 prompt: string,
17 };
18 } = await fetchJSON(
19 "https://api.openai.com/v1/images/generations",
20 {
21 method: "POST",
33 return json;
34};
35// Forked from @hootz.textToImageDalle
18 }
19 const { qrcode } = await import("https://deno.land/x/qrcode/mod.ts");
20 const base64Image = await qrcode(url);
21 res.send(
22 `<html><body><img src=${base64Image} height="100px" width="100px" /><p style="font-size:10px">QR Code generated using <a href="https://val.town">val.town</a></p><p style="font-size:10px">Built with 💗 by <a href="https://twitter.com/Ramkarthik">Ramkarthik</a></p></body></html>`,
23 );
24}
1export function cV3(name, image, address) {
2 return {
3 "name": name,
5 "description": "made on Tipstarter",
6 "seller_fee_basis_points": 0,
7 "image": image,
8 "external_url": null,
9 "collection": {
11 },
12 "properties": {
13 "category": "image",
14 "creators": [
15 {
9 <head>
10 <title>Today for Annalisa 🥹</title>
11 <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%3E%3C%2Fcircle%3E%3Cline%20x1%3D%2212%22%20y1%3D%2216%22%20x2%3D%2212%22%20y2%3D%2212%22%3E%3C%2Fline%3E%3Cline%20x1%3D%2212%22%20y1%3D%2212%22%20x2%3D%2216%22%20y2%3D%2212%22%3E%3C%2Fline%3E%3Cline%20x1%3D%2212%22%20y1%3D%2212%22%20x2%3D%2210%22%20y2%3D%2212%22%3E%3C%2Fline%3E%3C%2Fsvg%3E" />
12 <meta name="description" content="Today for Annalisa 🥹" />
13 <meta name="description" content="Today for Annalisa 🥹" />
17 <meta property="og:title" content="Today for Annalisa 🥹" />
18 <meta property="og:description" content="Today for Annalisa 🥹" />
19 <meta property="og:image" content="https://picsum.photos/1200/630" />
20 <meta property="og:url" content="https://mttlws-todayforannalisa.express.val.run" />
21 <meta property="og:type" content="website" />
22 <meta property="twitter:title" content="Today for Annalisa 🥹" />
23 <meta property="twitter:description" content="Today for Annalisa 🥹" />
24 <meta property="twitter:image" content="https://picsum.photos/1200/630" />
25 <style>
26 body {
1export let tempImageVal = {
2 "test": "img",
3 "test2": "img2",
447 "https://www.itraveljerusalem.com/article/israel-egypt-taba-border-crossing",
448 "https://www.itraveljerusalem.com/article/israeli-currency",
449 "https://www.itraveljerusalem.com/article/israel-and-pilgrimage-maps",
450 "https://www.itraveljerusalem.com/article/israel-visas-consulates",
451 "https://www.itraveljerusalem.com/article/jerusalem-day",
14 username: string;
15 bio: string;
16 profileImageUrl: string;
17};
18type ValResult = {