尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Public web viewer for the Weather Explorer highlights (ECMWF Open Data)
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A public, read-only web page that plays the current Weather Explorer highlights: https://tehoro.github.io/weather-explorer-web/
It is an addition to the iPhone app and its backend, and changes neither. A scheduled GitHub Action reads the backend's existing endpoints with the app key, as one more app would, converts the scene data into small static files, and publishes them with the viewer to GitHub Pages. Viewer traffic goes to GitHub's CDN; the backend sees one download of each scene per sweep.
backend (Replit) ──/api/highlights, /api/requests, /scenes──▶ sync.py (GitHub Actions, after each sweep)
│ WebP frames + feed.json
▼
GitHub Pages ──▶ browsers
sync.py — fetches the feed, requested events and scene files; writes site/data/. Scene files
never change once built, so each is converted once (kept in the Actions cache). Exit 3 means
nothing new, and the workflow then skips deploying.site/ — the viewer: index.html (including the Help text), style.css, app.js (WebGL2 colour fill, pan/zoom,
timeline, wind particles, panels), worker.js (frame decoding, isobars, highs and lows) and
basemap.json (Natural Earth 1:50m land and borders, public domain).tools/make_basemap.py — rebuilds basemap.json from the world-atlas TopoJSON..github/workflows/deploy.yml — sync and deploy, then the 3D jobs (see "3D view" below). Runs when the backend signals new highlights (repository_dispatch, see the backend's web_notify.py), with a fallback schedule (03:30–04:20 and 15:30–16:20 UTC, plus every three hours); sync, cache and Pages deploy.Share copies (or, on phones and iPads, offers through the share sheet) a link to exactly what
is on screen: #h=<tag>/<id>&s=<scene>&t=<valid time>&map=<style>&v=<lon>,<lat>,<zoom>. Units
and the time zone are left out, so each person sees their own. Each highlight is kept in data/items/ for 7 days
after it was last listed, so links keep working after the next sweep; an older one opens with a
note that it may be out of date, and an expired one opens the latest highlights.
Save builds a single HTML file in the browser, from files already on the site: the viewer
plus every frame of one highlight (a few MB) or all current highlights (tens of MB), embedded as
base64. It plays with no connection, like a saved highlight in the app. Satellite imagery still
needs a connection; the dark and light maps don't. units.js and app.js are plain scripts
(not modules) so the saved copy can inline them.
Video draws the current scene frame by frame at 30 fps (at the viewer's playback speed) with the
title, time, key, caption and credit, and encodes an MP4 in the browser with WebCodecs and
mp4-muxer (loaded from jsDelivr only when used). Square,
4:5 and 16:9. The button is hidden where the browser has no VideoEncoder, and in saved copies.
Highlights tagged tropical-cyclone get a 3D button. site/3d/ is a three.js model of the
highlight's box that you can turn, tilt and zoom: clouds and the warm core ray-marched from
humidity and temperature on 12 pressure levels, wind particles at 925 hPa (inflow) and 200 hPa
(outflow), rain, and the sea coloured by 10 m wind with isobars. It opens at the moment the map was
showing, returns to the same map view, and makes its own MP4 (same encoder as the map's Video).
build3d.py fetches the fields straight from ECMWF Open Data for the highlights' own run, about
1,500 range requests per storm (6–15 minutes each on GitHub's runners), and writes
data/3d/<item>-<run>/meta.json and bundle.bin.gz (4–12 MB, unpacked in the browser). The item
gets "view3d". The backend is not involved.
So the map update never waits for it, it runs as separate workflow jobs after the site is
deployed (build3d, then deploy3d if anything changed). sync.py only attaches bundles that
already exist. A new storm therefore shows its 3D button one deploy later than its map. A storm
whose build fails has no 3D button, and is retried after the next sync. Bundles are kept while
the item is listed and rebuilt only for a new run.
uv run build3d.py # build missing bundles for site/data/feed.json; exit 0 = changed, 3 = nothing new
Each scene becomes data/p/<tag>/<item>-<n>/ with meta.json and one lossless greyscale WebP per
frame and role (fill/, contours/; NNN.uv.webp holds wind u/v in red/green). Values are
8-bit: 0–254 between lo and hi, 255 missing; precipitation uses a square-root scale. This is
about a third of the size of the backend's JSON, often far less for smooth fields.
Requested events are published by their researched item only; the anonymous request text is not.
uv run sync.py
python3 -m http.server 8090 --directory site
sync.py reads APP_KEY from the environment, or ../backend/data/.app_key when run inside the
project folder.
APP_KEY (the key built into the app). If the app key changes,
update it with gh secret set APP_KEY --repo tehoro/weather-explorer-web.gh workflow run deploy.yml).site/ folder can be published unchanged to Cloudflare Pages (no bandwidth charge).