diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-08 08:10:39 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-08 08:10:39 -0500 |
| commit | 1abae87acaba85453ef9b7e1eafe0d6e8e22c4e5 (patch) | |
| tree | 9b07ac98e18b82fbacae20540fb7dd6b9681a4d8 /Makefile | |
| parent | 0f6ed33ab7f183f86763866f35dcf25c8ba27330 (diff) | |
| download | rulesets-1abae87acaba85453ef9b7e1eafe0d6e8e22c4e5.tar.gz rulesets-1abae87acaba85453ef9b7e1eafe0d6e8e22c4e5.zip | |
feat(scripts): add readability tool + pre-warm textstat in deps
Adds scripts/readability — a Python tool that prints standard readability metrics (Flesch Reading Ease, Flesch-Kincaid Grade, Gunning Fog, SMOG, Coleman-Liau, ARI, Dale-Chall, Linsear-Write) for one input file or as a side-by-side comparison of two.
Self-contained via PEP 723 inline metadata: textstat is declared as the script's only dependency, and the `#!/usr/bin/env -S uv run --quiet --script` shebang lets uv resolve it on each invocation.
The Makefile `deps` target now also pre-warms textstat in uv's cache so the first interactive run is fast.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -92,6 +92,13 @@ deps: ## Install required tools (claude, node, jq, fzf, ripgrep, emacs, playwrig { echo " emacs: installing..."; $(call install_pkg,emacs); } @command -v uv >/dev/null 2>&1 && echo " uv: installed ($$(uv --version | awk '{print $$NF}'))" || \ { echo " uv: installing..."; $(call install_pkg,uv); } + @# Pre-warm script-level Python deps (PEP 723 inline metadata in scripts/). + @# First-time invocations otherwise download their deps on demand; warming + @# the cache here keeps interactive use snappy. + @command -v uv >/dev/null 2>&1 \ + && uv run --quiet --with textstat python -c "" >/dev/null 2>&1 \ + && echo " textstat: cached (scripts/readability)" \ + || echo " textstat: skipped (uv missing or offline)" @if [ -d "$(CURDIR)/playwright-js" ]; then \ if [ -d "$(CURDIR)/playwright-js/node_modules/playwright" ]; then \ echo " playwright (js): installed (skill node_modules present)"; \ |
