Files
Toby c094eb88fa Open-source release: pipeline code, raw logs, derived data, licences, tests
Adds src/ (scripts, raw measurement logs, derived data, report source),
tests/, LICENSE (MIT, code) and LICENSE-DATA.md (CC BY 4.0 for the survey's
data; third-party terms). The report is updated to the current site; the
v1 and v2 data hand-off files are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-27 20:09:54 -04:00

21 lines
1.4 KiB
JavaScript

// Toggle Cable routes / Straight lines on every map and record what the page shows.
import { chromium } from 'playwright-core';
import { PAGE, HAND } from './paths.mjs';
const b = await chromium.launch({ executablePath: process.env.CH });
const p = await b.newPage({ viewport: { width: 1440, height: 900 } });
await p.goto(PAGE('site/index.html')); await p.waitForTimeout(1500);
for (const v of ['ae', 'dp', 'merc']) {
await p.click(`.models button[data-v="${v}"]`); await p.waitForTimeout(1200);
for (const mode of ['cable', 'line']) {
await p.click(`#mode button[data-mode="${mode}"]`); await p.waitForTimeout(900);
const r = await p.evaluate(() => ({ big: document.getElementById('rbig').textContent, lab: document.getElementById('rlab').innerText.replace(/\s+/g, ' ').slice(0, 120),
card: [...document.querySelectorAll('#card .row .top')].map(e => e.innerText.replace(/\s+/g, ' ')).join(' | '),
score: [...document.querySelectorAll('#score tbody tr')].map(r => r.cells[1].innerText.replace(/\s+/g, ' ')).join(' / '),
tab: document.querySelector('#card .tabs button[data-t="list"]').textContent }));
console.log(v, mode, JSON.stringify(r));
}
await p.click(`#mode button[data-mode="cable"]`);
}
await p.click('#mode button[data-mode="line"]'); await p.waitForTimeout(1500); await p.screenshot({ path: 'out/mode_line.png' });
await b.close();