Unique

hc2html

Reads a 1990s HyperCard stack's own file format and turns it into one HTML page that still runs

A HyperCard stack rendered as an HTML page inside a drawn classic Mac window: a menu bar reading Go and Info, a title bar labelled 'hc2html demo', a hand-drawn house and sun, a 'Say hello' button, a checked 'Sunny day' checkbox, a card field of instructions, and Prev card / card 1 of 2 / Next card buttons along the bottom.

A HyperCard stack from the 1990s needs a Mac, a copy of HyperCard, and increasingly an emulator just to open. hc2html reads the stack’s own file format and turns it into one HTML page that runs in any browser — no HyperCard, no emulator, no server.

HyperCard stacks are little self-contained databases-with-scripts Apple shipped from 1987 into the mid-1990s, and thousands survive only as files — on the Internet Archive, on old floppy images, in resource forks nobody has opened since System 7. hc2html parses that file directly: stack header, backgrounds, cards, every button and field property, the card order, and both on-disk layouts (format 8 from HyperCard 2.0/2.1, format 10 from 2.2 on). It’s a from-scratch reader for a thirty-year-old binary format, in dependency-free Python 3.9+.

Card and background art uses HyperCard’s own WOBA delta-compression scheme; hc2html decodes it in pure Python, a port of Rebecca Bettencourt’s MIT-licensed C++ decoder from Uli Kusterer’s stackimport. The resource fork — icons, cursors, sounds — is read from whatever form survived: a native fork, a saved .rsrc, AppleDouble’s ._Stack, or a MacBinary .bin. Every button and field style renders, including hilites drawn as a real XOR inversion, and an Info ▸ Objects & scripts panel shows the HyperTalk source for anything the runtime can’t execute, so a stack stays legible even where it doesn’t run.

The output isn’t a static picture of the stack: a JavaScript interpreter embedded in the HTML file runs a real subset of HyperTalk — message passing between part, card, background and stack, go navigation with the classic visual effects, answer/ask dialogs, sorting, chunk expressions — so scripted buttons keep working after the file is double-clicked cold. The find undersold how far this has been exercised: the author ran the converter against roughly 250 stacks, about 190 pulled from the Internet Archive’s HyperCard collection — Caper in the Castro, HyperBattleship, the Seinfeld and Hacker Crackdown hypertext stacks, NEUROBLAST, Oblique Strategies — and reports under 0.5% of HyperTalk statements producing a parser warning.

What doesn’t survive matches the find: HyperCard 1.x stacks need resaving in 2.x first; painting tools, XCMDs/XFCNs, external windows, printing, and encrypted or password-protected stacks are all out of scope. Two limitations the find missed: styled text inside a field collapses to plain text, and timing tricks like idle-handler loops are only approximated. It’s also not on PyPI — install is git clone plus pip install ., not the one-line pip install the find implied. MIT-licensed and two days old: version 0.1.0, one contributor, no GitHub issues yet — a fresh release, though the 250-stack test pass is a real signal it works today, not just on the demo.

github.com ↗

← back