Tarot, dealt in Hazel

Hazel activities › ancient oracles · source on GitHub · hazeljs on npm

Ask a question, choose a spread, and deal: the cards land face down, each in its place. Turn them over one at a time. The deck, the shuffle and the spreads are a Hazel program, shown beside the table as text, or in Hazel's own editor at the press of a button; the page passes it random numbers and lays out what it deals. While the program has an error or a hole, the page's own JavaScript deals instead, and the table says which did.

⏳ Loading Hazel (hazeljs from jsDelivr); until then the page's own JS deals.

A new reading

Deal to lay out a spread.

    This app needs JavaScript, and a page served over http (python3 -m http.server, then localhost).

    The vocabulary every module sees (tarot/rules/preamble.hz). The listings are text, highlighted, until Edit in Hazel opens each in Hazel's own editor (about 7 MB each), where Ctrl+click on a name, or F12, goes to its definition; Show as text goes back, your edits kept.

    loading preamble.hz…
    Deck the 78 cards and their names
    loading Deck.hz…
    Spreads each spread's places, and what a card there speaks to: some fixed, some built (a group of three for each path of a choice; a card for each month, from this one)
    loading Spreads.hz…
    Reading the deal. The page calls (deal = Reading.deal).
    loading Reading.hz…

    hazeljs-examples · versions · Apache 2.0 (code), CC BY 4.0 (words) · by Matthew Hammer · an example for hazeljs