TITLE=TTGWIKI ROUTE=/dos/ttgwiki LOCALE=en MODIFIED=1792417593 URL=https://wiki.teletypegames.org/dos/ttgwiki L=1 #50 L=2 #16 L=3 https://git.teletypegames.org/dos/ttgwiki L=4 https://git.teletypegames.org/dos/ttgwiki/releases L=5 https://git.teletypegames.org/dos/ttgwiki/releases/download/v0.2.0/TTGWIKI-v0.2.0.zip L=6 https://git.teletypegames.org/dos/ttgwiki/releases/download/v0.2.0/TTGWIKIW-v0.2.0.zip L=7 #72 L=8 #17 q│ TTGWIKI reads the public pages of this wiki on DOS (cTTGWIKI.EXEq, C++, Open q│ Watcom, 8086 code, mTCP) and on Windows 95 and later (cTTGWIKIW.EXEq, Winsock, q│ in a console window). A DOS machine cannot speak HTTPS, so the server side q│ of the same repository exports the wiki as plain text files, and the q│ Teletype Games 1FTP server shares them over anonymous, read-only FTP, next to q│ the 2DOSINST store. q│ q│ A page is downloaded when it is read and kept on the disk, so it can be read q│ again offline; cF6q downloads them all. The export follows the wiki within 15 q│ minutes. • bRepository:0 3git.teletypegames.org/dos/ttgwiki • bExport:0 cftp://ftp.teletypegames.org/WIKI0 (anonymous, read-only) • bInstall:0 cTTGWIKI0 and cTTGWIKIW0 from the 2DOSINST store, or from the 4releases: DOS: 5TTGWIKI-v0.2.0.zip · Windows 95 and later: 6TTGWIKIW-v0.2.0.zip i[Image: TTGWIKI reading a page in DOSBox] r────────────────────────────────────────────────────────────────────────────── 1What it does 1════════════ • bThe contents0 list the pages as a tree with the date of their last change. Typing searches the titles, ignoring case and accents (ckezdo0 finds iKezdőlap0). cF20 switches between English and Hungarian; a page without a translation is shown in the language it is written in, marked c[en]0. • bThe reader0 shows a page as the wiki has it: headings, lists, code blocks, quotes and tables, in colors. cTab0 / cShift+Tab0 select the links and the status line tells where they go, cEnter0 follows a link to another page, cBackspace0 goes back. A web link is only shown: open it on another machine. • bOffline0: a page read once stays in cCACHE\0 next to the executable. When the server cannot be reached, TTGWIKI says so and reads from the disk. A refused connection is reported at once on master; 0.2.0 still waits out mTCP's 10-second connect timeout first. cF60 (or cTTGWIKI SYNC0) downloads every page of a language. • bFresh0: at start and on cF50 TTGWIKI reads cWIKI.INI0 from the server. When the export has a new generation, the new page list comes and the pages that changed are deleted from the disk, so they are downloaded again when they are read. Nothing else is downloaded. • bPrinting0: cTTGWIKI SHOW /dos/gmenu > PRN0 prints a page as plain text. • bCode pages0: cCODEPAGE=8520 in cTTGWIKI.CFG0 shows every Hungarian letter; in 437 (the default) the missing ones become a near letter (ő → ö). p TTGWIKI browse the wiki p TTGWIKI SYNC download every page of a language p TTGWIKI SHOW route print a page 1How it works 1════════════ p wiki.teletypegames.org (Grav) p │ /custom/sitemap.json, /custom/page.json (inside the wiki's docker» p network) p ▼ p exporter (server/export.py) at start, then every 15 minutes p │ WIKI.INI, EN/INDEX.TXT, EN/FILES.LST, EN/P0000001.TXT, ... HU/... p ▼ p FTP (infra/ftp-server) ftp://ftp.teletypegames.org/WIKI p │ p ▼ p TTGWIKI.EXE / TTGWIKIW.EXE CACHE\EN\..., CACHE\HU\... • The bexporter0 reads the same JSON endpoints as the 7wiki BBS, renders every public page's HTML as text (cserver/render.py0) and writes a folder per language. A restart exports at once. A new export is written only when something changed; the language folders are swapped in with renames and cWIKI.INI0 comes last with the next generation number. A failed run (the wiki down) changes nothing. • bPrivate pages never leave the server0: they are dropped from the sitemap, and without a token Grav does not give out their text anyway. • bA page file0 has header lines (cTITLE=0, cURL=0, cL= 0 for each link), then lines of at most 78 characters, UTF-8. Control bytes that take no column mark the styles (c01h c0) and the links (c02h n 03h0 … c04h0); every line is complete in itself, so the reader can start anywhere. TTGWIKI turns the text into the code page of the screen, one byte for every character, and reads a page a line at a time from the disk (the longest page has nearly 3000 lines). • bIds stay0: a page gets a number once (cP0000123.TXT0), read back from cINDEX.TXT on every export; the two languages share it, so cF20 shows the same page. • cFILES.LST0 has the CRC-32 and the size of every file, in DOSINST's format: every download is checked. 1The server 1══════════ The cttgwiki0 stack on vps.teletype.hu (c/srv/stacks/ttgwiki0, ccompose.yaml0) is the exporter alone. It writes the cWIKI0 folder of the 1FTP server (c/srv/stacks/ftp-server/root/WIKI0), which shares it on port 21: anonymous, read-only, passive mode only. Since 0.2.0 TTGWIKI connects there by default (cPORT=210, cPATH=/WIKI0); 0.1.0 used port 2121, which is closed. The exporter joins the network of the cwiki-pages0 stack. A push to master that changes the server side deploys it from the pipeline. 1Building and tests 1══════════════════ Open Watcom v2, as for DOSINST: cSOURCE/build.sh0 builds both executables. The client is in layers on 8DOSLIB (which got the code pages 437 / 852 and seeking in files for it). The pipeline runs the server side's tests (the renderer, the exporter on a fake wiki), the client's unit tests on the host, and two end-to-end tests: the exporter writes a small export, the FTP server shares it, and TTGWIKI runs in a headless DOSBox Staging (printing, downloading, a new export, code page 852, offline, browsing with scripted keys) and TTGWIKIW under Wine. The test step runs in the cdos-ci0 image (cgit.teletypegames.org/build/dos-ci:bookworm0) with the toolchain preinstalled, the release step in the cci-tools0 image. The deploy and store steps only call the server's cdeploy0 user over SSH, each with its own key bound to one fixed command (cci-deploy ttgwiki0, cci-deploy dos-ttgwiki-store0; cinfra/host-config0): for the deploy the server clones master itself and checks ccompose.yaml0 against a policy, so the pipeline needs no trusted volumes. Details: the repository's README.