chore(scripts): delete unreferenced helper scripts

None of these is referenced by an installer, systemd unit, CI workflow,
test, the web UI or src/:

- utils/cleanup_venv.sh removes venv_web_v2, which nothing creates
- utils/clear_python_cache.sh hardcodes ~/LEDMatrix and a .webassets-cache
  nothing uses
- install/migrate_config.sh only copies the template, which the installer
  and ConfigManager already do
- install/debug_install.sh, debug/debug_web_manual.py
- diagnose_web_ui.sh and verify_web_ui.sh overlap diagnose_web_interface.sh,
  which the docs point to
- fix_internet_connectivity.sh is iptables-only (stale on nftables)
- diagnose_plugin_permissions.sh, dev/validate_python.py
- download_nba_logos.py + README_NBA_LOGOS.md: logo_downloader fetches
  logos on demand
- setup_plugin_repos.py linked into the production plugin-repos/ dir; the
  dev workflow is scripts/dev/dev_plugin_setup.sh, and
  MULTI_ROOT_WORKSPACE_SETUP.md now uses it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chuck
2026-09-22 16:15:59 -04:00
co-authored by Claude Opus 5.5
parent 967f3a0567
commit bc553b69d6
18 changed files with 41 additions and 1407 deletions
-1
View File
@@ -19,7 +19,6 @@ All installation scripts have been moved from the project root to `scripts/insta
| `install_wifi_monitor.sh` | `scripts/install/install_wifi_monitor.sh` |
| `setup_cache.sh` | `scripts/install/setup_cache.sh` |
| `configure_web_sudo.sh` | `scripts/install/configure_web_sudo.sh` |
| `migrate_config.sh` | `scripts/install/migrate_config.sh` |
#### Permission Fix Scripts
+41 -46
View File
@@ -10,11 +10,12 @@ Official plugins live in a single repository,
[ledmatrix-plugins](https://github.com/ChuckBuilds/ledmatrix-plugins), with one
directory per plugin under `plugins/`. There are no separate per-plugin
repositories. For development you clone that monorepo **next to** LEDMatrix
and symlink its plugin directories into LEDMatrix's `plugin-repos/`, which is
where the plugin loader looks by default.
and symlink the plugin directories you are working on into LEDMatrix's
`plugins/` directory with `scripts/dev/dev_plugin_setup.sh`.
- ✅ Plugin code stays in the monorepo checkout, with its own git history
- ✅ LEDMatrix discovers the plugins through symlinks in `plugin-repos/`
- ✅ LEDMatrix discovers the plugins through symlinks in `plugins/`
(git-ignored), so the production `plugin-repos/` directory is untouched
- ✅ `LEDMatrix.code-workspace` opens both repositories in VS Code/Cursor
## Directory Structure
@@ -22,12 +23,11 @@ where the plugin loader looks by default.
```text
~/Github/
├── LEDMatrix/ # Main project
│ ├── plugin-repos/ # Plugin directory the loader scans
│ │ ├── starlark-apps/ # Bundled with LEDMatrix (tracked in git)
│ │ ├── web-ui-info/ # Bundled with LEDMatrix (tracked in git)
│ │ ├── clock-simple -> ../../ledmatrix-plugins/plugins/clock-simple
│ │ ├── ledmatrix-weather -> ../../ledmatrix-plugins/plugins/ledmatrix-weather
│ ├── plugins/ # Dev plugin directory (git-ignored)
│ │ ├── clock-simple -> ~/Github/ledmatrix-plugins/plugins/clock-simple
│ │ ├── ledmatrix-weather -> ~/Github/ledmatrix-plugins/plugins/ledmatrix-weather
│ │ └── ...
│ ├── plugin-repos/ # Default (Plugin Store) plugin directory
│ ├── LEDMatrix.code-workspace # Opens LEDMatrix and ../ledmatrix-plugins
│ └── ...
└── ledmatrix-plugins/ # Plugin monorepo (git repo)
@@ -44,61 +44,65 @@ where the plugin loader looks by default.
### 1. The plugin monorepo
Clone ledmatrix-plugins into the same parent directory as LEDMatrix (the
scripts below look for `../ledmatrix-plugins` relative to the LEDMatrix
root):
workspace file and `scripts/update_plugin_repos.py` look for
`../ledmatrix-plugins` relative to the LEDMatrix root):
```bash
cd ~/Github
git clone https://github.com/ChuckBuilds/ledmatrix-plugins.git
```
### 2. Symlinks in plugin-repos/
### 2. Symlinks in plugins/
`scripts/setup_plugin_repos.py` creates one symlink per plugin in
`LEDMatrix/plugin-repos/`, named after the plugin's manifest `id` and pointing
at `../ledmatrix-plugins/plugins/<dir>`.
`scripts/dev/dev_plugin_setup.sh link <name> <path>` creates
`LEDMatrix/plugins/<name>` as a symlink to a plugin directory. Use the
plugin's manifest `id` as the name: that is the name the loader and
`config.json` use, and the script warns when the two differ.
### 3. Multi-root workspace
`LEDMatrix.code-workspace` has two roots: LEDMatrix itself and
`../ledmatrix-plugins`.
## Setup Scripts
## Setup
### Initial Setup
### Link plugins
```bash
cd ~/Github/LEDMatrix
python3 scripts/setup_plugin_repos.py
./scripts/dev/dev_plugin_setup.sh link clock-simple ../ledmatrix-plugins/plugins/clock-simple
./scripts/dev/dev_plugin_setup.sh list # show what is linked
```
This script:
- Reads each `manifest.json` under `../ledmatrix-plugins/plugins/`
- Creates `plugin-repos/<id>` symlinks (relative) to those directories
- Leaves correct links alone, replaces links that point elsewhere, and skips
(does not overwrite) a real directory of the same name — for example a
plugin you installed from the Plugin Store. Remove that directory first if
you want the linked copy.
If a real (non-symlink) directory of the same name already exists in
`plugins/`, the script offers to back it up and replace it.
Without a sibling checkout, `./scripts/dev/dev_plugin_setup.sh link-github
<name>` clones the monorepo into `~/.ledmatrix-dev-plugins/` instead and links
the plugin from there. See the
[Plugin Development Guide](PLUGIN_DEVELOPMENT_GUIDE.md).
### Updating Plugins
```bash
cd ~/Github/LEDMatrix
python3 scripts/update_plugin_repos.py
python3 scripts/update_plugin_repos.py # git pull in ../ledmatrix-plugins
# or
./scripts/dev/dev_plugin_setup.sh update # git pull in every linked checkout
```
This runs `git pull` in `../ledmatrix-plugins` and prints the result. The
symlinks pick up the new code; restart the display to load it.
The symlinks pick up the new code; restart the display to load it.
## Configuration
The loader reads plugins from `plugin_system.plugins_directory` in
`config/config.json`. The default is already right for this setup:
The loader scans only `plugin_system.plugins_directory` in
`config/config.json` (default `plugin-repos`). Point it at `plugins` so it
finds the links:
```json
{
"plugin_system": {
"plugins_directory": "plugin-repos"
"plugins_directory": "plugins"
}
}
```
@@ -117,7 +121,7 @@ The loader reads plugins from `plugin_system.plugins_directory` in
### Adding New Plugins
1. Create `plugins/<your-plugin-id>/` in the monorepo checkout
2. Run `python3 scripts/setup_plugin_repos.py` in LEDMatrix to link it
2. Link it: `./scripts/dev/dev_plugin_setup.sh link <your-plugin-id> ../ledmatrix-plugins/plugins/<your-plugin-id>`
## Troubleshooting
@@ -125,30 +129,21 @@ The loader reads plugins from `plugin_system.plugins_directory` in
```bash
cd ~/Github/LEDMatrix
ls -la plugin-repos/ # links present and not broken?
python3 scripts/setup_plugin_repos.py # recreate them
ls -la plugins/ # links present and not broken?
./scripts/dev/dev_plugin_setup.sh status # link targets and git state
```
Also check that `plugin_system.plugins_directory` is `plugin-repos`.
### "Monorepo plugins directory not found"
`setup_plugin_repos.py` expects the monorepo at `../ledmatrix-plugins`. Clone
it there (or symlink it there).
Also check that `plugin_system.plugins_directory` is `plugins`.
### Plugin updates not showing
1. Verify the link target: `ls -la plugin-repos/<id>`
1. Verify the link target: `ls -la plugins/<id>`
2. Check that you're editing the monorepo checkout, not a store-installed copy
3. Restart the LEDMatrix service (or `run.py`)
## Notes
- `plugin-repos/` is tracked in git only for the bundled plugins
(`starlark-apps`, `web-ui-info`). The symlinks you create are untracked
files; don't commit them.
- For linking a single plugin into `plugins/` instead (without a sibling
checkout), see `scripts/dev/dev_plugin_setup.sh` in the
[Plugin Development Guide](PLUGIN_DEVELOPMENT_GUIDE.md).
- `plugins/` is git-ignored (except `plugins/.gitkeep`); the symlinks are
never committed.
- When changing a plugin in the monorepo, bump its manifest `version` and run
`python update_registry.py`, or users won't receive the update.