Repository navigation
Add the script that makes the README's sheets screenshot - #11
Merged
Merged
Conversation
The script behind PR #6 was never committed, so PR #10 had to piece docs/screenshots/sheets.webp together again from the old picture. scripts/screenshots now keeps it: - sheets.mjs builds the app, serves it with vite preview and takes the two screens in headless Chrome as a 390 x 844 phone at 2x, with an oscillator in place of the microphone (E2, A2 and D3 confirmed, G3 flat), then sets them in phone frames and writes the WebP. - chrome.mjs starts headless Chrome and drives it through the DevTools Protocol with Node's own WebSocket: no new dependency. - sheets.html is the composition, 1100 x 920. Run it with `node scripts/screenshots/sheets.mjs` (Node 22 or later, Google Chrome or CHROME_PATH). It reproduces the picture on master within 1/255 on average, so the image itself is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The script behind PR #6 was never committed, so PR #10 had to rebuild
docs/screenshots/sheets.webpfrom the old picture. This keeps that script in the repository, inscripts/screenshots/.sheets.mjsbuilds the app, serves it withvite previewand opens it in headless Chrome as a 390 × 844 phone at 2x. An oscillator stands in for the microphone: it takes the tuner through E2, A2 and D3 (each confirmed) to a flat G3. The script then takes the list of tunings (dark) and Settings (light), sets them in phone frames and writes the WebP in place. It stops with an error if the three strings were not confirmed.chrome.mjsstarts headless Chrome and drives it through the DevTools Protocol with Node's ownWebSocket, so there is no new dependency. It finds Chrome on Windows, macOS and Linux, or takesCHROME_PATH.sheets.htmlis the composition (1100 × 920): the dark background under a 45 % veil of--bg-base, the screens at 0.9× in a 10 px bezel.README.mdthere explains it, and a line under the README's screenshots points to it.It needs Node 22 or later (for
WebSocket) and Google Chrome. The app is driven through its own markup (the tuning pill, the gear's label, Start, the Light segment), so a change there means a change in the script.Checks
sheets.webpis not changed here.eslint .passes and Prettier is clean on the new files.src/changes.