Catalog of Mech Blocks

Each block is a capitalized word that leads to specific computations. Blocks use and update state passed from block to block. They can reach into the federated wiki client and server-side environment. Expect them to offer informative messages as they run.

# Client

CLICK — Offer to proceed once user clicks.

DELTA — Apply recent remote site changes.

FILE — User selects one of avalable files.

FORWARD — Move the drawing "turtle" forward.

FROM — Read sensor endpoints from a page.

GET — Await a result from the server.

HELLO — Add a happy face each time run.

KWIC — Costruct a Keword-In-Context index.

LINEUP — Make a page from current lineup.

LISTEN — Wait for a specific message.

MESSAGE — Send a specific message.

NEIGHBORS — Retrieve avalable neighborhood sitemaps.

PREVIEW — Display computed state as a ghost page.

RANDOM — Select a random page from the neighbors.

REPORT — Report measurement in place in the item.

ROSTER — Make a Roster for current neighborhood.

SENSOR — Read sensor data from a named endpoint.

SHOW — Add an existing page to the lineup.

SLEEP — Suspend a sequence of blocks.

SOLO — Launch the Solo plugins pop-up viewer.

SOURCE — Read a data source from the lineup.

TICK — Proceed repeatedly once user clicks.

TOGETHER — Start all blocks at once.

TURN — Turn the drawing "turtle" to a new direction.

UNTIL — Stop TICKing one a condition is met.

WALK ` Explore the neighborhood link graph.

POPUP — Open a pop-up window with various contents.

PRINT — Compose printable "story" and "garden.

# Server

HELLO — Add a happy face each time run.

UPTIME — Report time server has run.

SLEEP — Suspend a sequence of blocks.

COMMONS — Report image file and byte count.

DELTA — Retrieve recent site chages.

.

We check if this list matches the code.

CODE

export default function() { const docs = this.context.page.story .map(item=>item.text.match(/\[\[(.*?)\]\]/)) .filter(m => m) .map(m => m[1]) const there = new Set(docs) const here = new Set(this.context.blocks) const need = here.difference(there) return `Need ${[...need]}` }