From 1abae87acaba85453ef9b7e1eafe0d6e8e22c4e5 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 8 May 2026 08:10:39 -0500 Subject: feat(scripts): add readability tool + pre-warm textstat in deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6e859c8..7df7f13 100644 --- a/Makefile +++ b/Makefile @@ -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)"; \ -- cgit v1.2.3