Skip to content

Latest commit

 

History

History
123 lines (92 loc) · 4.07 KB

File metadata and controls

123 lines (92 loc) · 4.07 KB

Scripts

Index of utilities in scripts/. Run from the repo root unless noted.

Workspace utilities

bootstrap-project.sh

Scaffolds a new sibling project directory in the WebJamApps workspace with basic README and structure.

./scripts/bootstrap-project.sh <project-name>

Note: the script currently hard-codes a workspace root path. Edit ROOT_DIR near the top of the file to match your machine before use.

check-env.sh

Quick health check for the local development environment. Reports Node version, rclone Google Drive mount status, GitHub CLI auth, and basic Drive visibility.

./scripts/check-env.sh

Note: contains hard-coded paths that assume the maintainer's home directory layout. Adapt before using on a different machine.

new-agent-worktree.sh

Creates an isolated git worktree for a WebJamApps sibling repo/branch — the setup an agent needs to work on that repo without touching the shared main clone. Seeds the gitignored .env / .env.test from the repo's main clone into the new worktree when present (a fresh worktree never inherits gitignored files, which otherwise breaks local DB-backed test runs there — web-jam-tools#257). Prints the new worktree's absolute path as the last line of stdout.

scripts/new-agent-worktree.sh <Repo> <branch> [base]
  • Repo — sibling directory name under the workspace root (e.g. WebJamSocketCluster), must already be a git clone
  • branch — branch name to create for the new worktree
  • base — base ref to branch from (default: dev)

The worktree is created at <Repo>/.claude/worktrees/<branch> (/ in the branch name is flattened to -). Set WEBJAMAPPS_ROOT to override the default workspace root (/home/joshua/WebJamApps).

Depends on hooks/block-secret-dumps.sh's cp/test exception (web-jam-tools#257) — without it, an agent working inside the new worktree can't re-seed these files by hand if it ever needs to.

reaper-update.sh

Downloads and installs the latest REAPER version to a specified prefix. Detects the currently installed version, compares it to the latest available, and updates in place if needed. Preserves user configuration in ~/.config/REAPER.

Invocation options (in preference order):

  1. From anywhere (after one-time setup):

    reaper-update

    One-time setup (run from repo root):

    ln -s "$PWD/scripts/reaper-update.sh" ~/.local/bin/reaper-update

    Requires ~/.local/bin on PATH.

  2. From inside the repo:

    deno task update:reaper
  3. Direct script invocation:

    bash scripts/reaper-update.sh

Environment variables:

  • REAPER_PREFIX (default: /home/joshua/opt) — the parent directory where REAPER is installed

Example with custom prefix:

REAPER_PREFIX=/opt reaper-update

Safety: the script checks that REAPER is not running before updating and fails if it detects a running process. Quit REAPER before updating.

Example scraping / data utilities

These scripts target a specific Wix-hosted site and were built as one-offs for the maintainer's use case. They're committed as examples of Playwright scraping patterns against a Wix site backed by MUI DataGrid, not as general-purpose tools.

Script What it does
debug-wix.js Dumps the rendered DOM structure of the target site for inspection
find-pagination.js Detects pagination controls on the target site
scrape-gigs-v2.js First-pass scraper that walks pages of gig listings
scrape-gigs-v3.js Newer scraper that handles MUI DataGrid virtualization
scrape-and-sync.js Scrapes listings and writes them out as XLSX
get-unique-venues.js Reads a text list of past gigs and emits unique venue names

Prerequisites

npm install   # installs playwright + xlsx
npx playwright install chromium

All of these scripts read from / write to local paths that are hard-coded near the top of each file (Dropbox, Google Drive mount, etc.). Edit the paths before running, or use them as reference implementations only.