---
title: 'Alexandria BBS'
url: 'https://wiki.teletypegames.org/services/alexandria-bbs'
markdown: 'https://wiki.teletypegames.org/services/alexandria-bbs.md'
lang: en
date: '2026-10-26'
description: 'Type the title of an article, and Alexandria BBS looks it up on wikipedia.org and shows it in a form a terminal can read: plain text, cut into its sections, wrapped to the screen. Live at teletypegames.org:2326, and in the browser on bbsweb, and through TTG Gate BBS Overview A Ruby app on the rub…'
taxonomy:
  tag:
    - howto
---

# Alexandria BBS

> Type the title of an article, and Alexandria BBS looks it up on wikipedia.org and shows it in a form a terminal can read: plain text, cut into its sections, wrapped to the screen.
> 
> **Live at `teletypegames.org:2326`**, and in the browser on [bbsweb](https://bbsweb.teletypegames.org), and through [TTG Gate BBS](https://wiki.teletypegames.org/services/ttg-gate-bbs)

# Overview

A Ruby app on the [**rubbs**](https://git.teletypegames.org/engines/rubbs) gem, like the [Teletype BBS](https://wiki.teletypegames.org/services/teletype-bbs). It has two faces on one port:

- **Modern** — for ANSI terminals (SyncTERM, NetRunner, PuTTY, bbsweb): a desktop under a menubar, windows, mouse.
- **Commodore 64** — PETSCII on a 40×25 screen with single-key menus, for a C64 terminal program (CCGMS, StrikeTerm, SyncTERM in C64 mode) behind a WiFi modem.

A call starts with one question: which terminal is calling. The proxy guesses first from the telnet answers (a window wider than 40 columns is a modern terminal, 40 or no answer a C64); RETURN takes the guess, `1` picks the modern face, `2` the C64.

# Reading an article

What you type is first looked up as a title: when Wikipedia has an article of that title, or one it redirects to (`c64` → *Commodore 64*), it opens at once. Otherwise the search results come, best first.

An article opens with its sections: the lead under the article's title, then the main sections, their subheadings inside them. See also, References, External links and the like are left out. A formula is shown as its TeX made readable (`e^(iπ)+1=0`). Every article shows its address: the text is Wikipedia's, under CC BY-SA.

The languages are English and Hungarian (`ALEXANDRIA_BBS_LANGUAGES`, the first one is the default).

## Modern face

| Key | Action |
|---|---|
| `F2` | Search… |
| `F3` | Random article |
| `F4` | Switch language |
| `Enter` | Open the search result |
| `F5` / `Alt-Enter` | Full screen and back |
| `Esc` | Close the window |
| `Alt-X` | Log off |

The results window lists the titles with the matching snippet; the article window has the sections on the left and the text on the right.

## C64 face

Type a title at the prompt and RETURN. RETURN alone opens the menu: `R` random article, `L` language, `Q` log off. Results and sections are numbered lists: the number and RETURN opens one, RETURN alone turns the page, `Q` or `←` goes back. A section stops at every screenful.

# Under the hood

The proxy reads the MediaWiki Action API of `en.wikipedia.org` and `hu.wikipedia.org` anonymously: `list=search` for the results, `prop=extracts` (plain text) for the article, `list=random` for a random one, and names itself in the User-Agent, as Wikipedia asks. Results and articles are cached for 10 minutes. The C64 face writes the same text as the modern one; rubbs' PETSCII line turns it into the C64's character set (accented letters become their nearest ASCII).

A push to master deploys it from Woodpecker (`ci-deploy alexandria-bbs`); the container is `alexandria-bbs`, in `/srv/stacks/alexandria-bbs`.

'; var prevLevel = 2; for (var i = 0; i < headings.length; i++) { var h = headings\[i\]; var text = h.textContent.trim(); var slug = text.toLowerCase() .replace(/\[áàâä\]/g,'a').replace(/\[éèêë\]/g,'e').replace(/\[íìîï\]/g,'i') .replace(/\[óòôöő\]/g,'o').replace(/\[úùûüű\]/g,'u') .replace(/\[^a-z0-9\]+/g, '-').replace(/^-|-$/g, ''); if (!slug) slug = 'heading-' + i; if (used\[slug\]) { slug += '-' + i; } used\[slug\] = true; h.id = slug; var level = parseInt(h.tagName.charAt(1)); var cls = level > 2 ? ' class="toc-child"' : ''; html += '- [' + text + '](#'%20+%20slug%20+%20')
'; } html += '
'; toc.innerHTML = html; // Scroll-spy: highlight current heading var links = toc.querySelectorAll('a'); var ids = \[\]; for (var j = 0; j < links.length; j++) ids.push(links\[j\].getAttribute('href').slice(1)); function updateActive() { var current = ''; for (var k = 0; k < ids.length; k++) { var el = document.getElementById(ids\[k\]); if (el && el.getBoundingClientRect().top <= 80) current = ids\[k\]; } for (var m = 0; m < links.length; m++) { links\[m\].parentNode.classList.toggle('active', links\[m\].getAttribute('href') === '#' + current); } } window.addEventListener('scroll', updateActive, { passive: true }); updateActive(); })();

---

## Navigation

- Parent: [Services](https://wiki.teletypegames.org/services.md)
- Next: [BBS Network](https://wiki.teletypegames.org/services/bbs-network.md)
