An image archive of @299792457_, rendered with twitter-snap.
The archive also includes an interactive activity dashboard built from the searchable JSON records with pandas and Plotly.
GitHub Actions runs hourly. It uses @yuta/bird
through Twitter Safe Relay to enumerate post IDs, renders each new status with
twitter-snap's exported getSnapAppRenderWithCache API and guest session, and
commits each record to snapshots/YYYY/MM/<tweet-id>.<png|mp4> with a searchable
<tweet-id>.json sidecar produced by twitter-snap's Json theme. JSON is
pretty-printed for readable diffs and repository search. Image posts remain
2x-resolution PNGs and video posts are rendered as MP4s. Posts and authored
replies are both collected from UserTweetsAndReplies, including replies to
other accounts and continuations of a self-thread. Each status in a thread is
archived as its own addressable record. The library API reuses the guest
session and font cache across posts in one run.
After collecting posts, the same workflow rebuilds dashboard/index.html. The
dashboard summarizes daily activity, posting times in Japan Standard Time, and
frequent reply recipients. Its output is deterministic, so runs without new
archive data do not create commits.
Only ID enumeration is authenticated by the home relay. Rendering uses a guest token, so X cookies are never copied into GitHub Actions. The collector stops after five consecutive existing authored IDs and renders at most 40 new posts or replies per run.
Enter the Nix development shell to get Node.js, pnpm, FFmpeg, Python, and uv. FFmpeg is required to render video posts and is also installed by GitHub Actions:
nix developAdd the repository Actions secrets TS_OAUTH_CLIENT_ID and TS_OAUTH_SECRET.
The OAuth client must allow tag:ci nodes to join the tailnet and reach
tw.home.yutakobayashi.com.
Run a snapshot locally with:
pnpm install --frozen-lockfile
pnpm snapshotBuild the dashboard locally with:
uv sync --locked
uv run --locked python scripts/build_dashboard.pyRun the dashboard tests with:
uv run --locked python -m unittest discover -s tests -vRebuild every existing PNG or MP4 at 2x resolution with:
pnpm snapshot -- --rebuildBackfill every missing authored post, including replies, through Safe Relay's
paginated UserTweetsAndReplies timeline with:
pnpm snapshot -- --backfillBackfill missing JSON sidecars for up to 40 existing snapshots per run with:
pnpm snapshot -- --backfill-jsonYou can also start the Archive X snapshots workflow manually from the Actions
tab. Scheduled and manual runs operate only on the default branch.
Keep both dependencies pinned. Before opening a pull request, run
pnpm install --frozen-lockfile and verify that pnpm snapshot creates a
non-empty PNG or MP4 with a matching, valid JSON sidecar. Update this README
when the schedule, target, output layout, or required secret changes.
