Github API examples & templates
Use these vals as a playground to view and fork Github API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
ije
html
Script
Rendering html with jsx - https://github.com/ije/html using JSX support Atomic CSS powered by UnoCSS dark mode(color scheme) /** @jsx h */
import { h, html } from "https://esm.town/v/ije/html";
export default () => {
return html(
<div class="flex items-center justify-center w-screen h-screen">
<p class="text-5xl font-bold text-green-600">Hello World!</p>
</div>
);
}; Demo: https://www.val.town/v/ije/htmlDemo
0
tmcw
bandcampWrapped
HTTP
Bandcamp Wrapped It's Spotify Wrapped, but for Bandcamp! . Bandcamp is for people who buy their music and probably most of them hoard MP3s. Like me. And this val helps those people
turn their Bandcamp purchases of 2024 into HTML or Markdown suitable for blog posts on their blogs, which is probably a segment that has some overlap with the people who are
wacky enough to buy their music instead of streaming it from some service. Because Bandcamp doesn't have an API, this hinges on you going to your purchases page, copying the purchases, and pasting it in. Thanks to
the ability of the system clipboard to contain HTML , the same technology that makes
copy-and-pasted text have unpredictable and annoying font and boldness choices also lets this parse and reformat that purchases page into something
shareable. I would love for this to support embeds as well, but I haven't found a strategy yet:
Bandcamp embeds use album IDs in the URLs,
which are not exposed in the content on the purchases page. I'd have to scrape Bandcamp for that, which
would probably inevitably be blocked by some 'bot protection' system. Also read about this on macwright.com .
1