I have no idea what this is for.
Okay, fine. It's a Cloudflare Pages Function. It takes a text file full of terrible puns, picks one, and serves it as a terminal-themed SVG (or PNG!) so that archaic university email clients actually render it. Think of it as the legacy UNIX fortune program, but repackaged as a web endpoint to annoy your professors.
It also contains a concerning number of Serial Experiments Lain and Terry Davis GIFs for the 404 pages (see public/assets/404-gifs/). I will not be taking questions at this time.
GET /fortune- Rolls the dice. Put this in your
<img>tag and hope it doesn't get you expelled. GET /fortune?text=<text>- For when you want to fake a quote but still want that sweet terminal aesthetic.
GET /fortune?mode=png- Forces a PNG render via a statically bundled WebAssembly engine. For email clients that aggressively hate vectors.
GET /quote,GET /quotes- Aliases, because I couldn't decide what to name the file in
functions/.
- Open
public/assets/fortune/quotes.txt. - Add your quotes. Delimit them with a
%on its own line (standardfortune(6)format). - Deploy it.
- Paste the image link into your email signature.
- To learn more about this step, read the README.
i use nix, btw:
nix develop pnpm install pnpm run dev
Variables are in wrangler.toml.
If you need help configuring them, see README.
- Build command:
pnpm gen - Build output directory:
public
REUSE-compliant (MIT or CC0-1.0). Run reuse lint to verify.
