Skip navigation

Open Knowledge Platform

This page is the contributor and API-user reference. For the narrative case-study with Middle-earth numbers, see the blog post. For the full developer design doc, see docs/external_metadata_sources.md in the repo.

What it is

GameEdu's catalogue — locations, characters, creatures, items, organisations, events, books, maps — is pulled from canonical fan-curated sources (Tolkien Gateway, Fandom wikis, Comic Vine, 5e.tools, L-Space, RPG Geek, BoardGameGeek, World Anvil, Sphero Edu API, OpenTTD TrueWiki, …) into Wagtail snippets. Every imported field is recorded with provenance — which source, when, by which handler version — and the raw scrape payload is preserved so editors can diff over time, replay a historical scrape, or roll back.

The three-table linkage layer

Entry is the join, Scrape is the history. The same character can have entries against Tolkien Gateway and against LotR Fandom, each with its own scrape series. Handlers decide which snippet fields to write back on apply(); the scrape payload always survives verbatim.

The metagraph

The setting page anchors everything: dedup is scoped to a setting, every catalogue snippet pivots through one via inline *Settings orderables. Cross-links between snippets (character → location, event → location, event → organisation, character → creature) are real FKs or inline orderables — queryable in one hop.

GameSettingPage GameCharacter GameLocation GameCreature GameItem GameOrganization GameCoreEvent GameBook GameMap GameCharacterLocations GameCharacterCreatures Game*Settings (×8) MetadataCatalog MetadataEntry MetadataScrape location FK organization FK Generic FK FK inline Setting Snippet Metadata layer Join orderable FK Generic FK inline child

Supported sources

SourceDomainAuthStatus
Tolkien Gatewaytolkiengateway.netnone (Cloudflare via Flaresolverr)handler + bulk sync
LotR Fandomlotr.fandom.comnone (MediaWiki API)handler + bulk sync
L-Space (Discworld)wiki.lspace.orgnonehandler + bulk sync (chars / locs / creatures / events)
Fandom — Discworlddiscworld.fandom.comnonefandom_full handler + fallback
Comic Vinecomicvine.gamespot.comAPI key (free)handler + sync_external
World Anvilworldanvil.comAPI tokenhandler + bulk seed
5e.tools5e.toolsnone (offline JSON mirror)seed commands (books, creatures)
RPG Geekrpggeek.comscrapingsync_setting_rpggeek_metadata
BoardGameGeekboardgamegeek.comXMLAPI v2game_board
Scryfall (MTG)scryfall.comnonegame_magic
Pokemon TCGpokemontcg.ioAPI keygame_pokemon
TrueWiki (OpenTTD)wiki.openttd.orgnone (scrape)truewiki_tools
Sphero Edu APIapi.littlebits.comAPI keysphero_tools

Releases

Pipeline first-end-to-end case study: Middle-earth in a weekend — 875 characters, 700 locations, 720 char↔location edges, 1,544 OK scrapes across two sources.

Adding a new source

  1. Catalog seed — append the source to seed_metadata_catalogs.DEFAULTS with its slug, handler name, and base URL.
  2. Handler — drop game_core/sync/<source>.py implementing fetch(entry) → payload and apply(entry, payload). Decorate with @register. Import from game_core/sync/__init__.py so registration runs at boot.
  3. Importer command — for bulk ingest, add a sync_<source>_<entity> management command that drives _wiki_category_sync.run_multi_wiki_sync (MediaWiki) or a custom walker. The engine handles setting-scoped dedup, collision suffixing, freshness skip, MetadataEntry / Scrape stamping, and the cross-link pass.

API

Catalogue snippets are exposed via Wagtail's GraphQL endpoint at /graphql/. Each MetadataScrape.payload is publicly readable JSON — use it to build third-party tools (campaign planners, fan-wiki cross-references, AI assistants grounded in canon) without re-scraping the original sources.

Import API for editors / external pipelines:

curl -X POST https://www.gameedu.eu/api/wagtail/import/ \
-H "X-API-Key: $API_KEY" -H "Content-Type: text/yaml" \
--data-binary @page.yaml