Back to browse
Venetianblinds.js – evenly spaced windows into text files

Venetianblinds.js – evenly spaced windows into text files

by firasd·Jul 6, 2026·2 points·1 comment

AI Analysis

●●SolidBig BrainNiche Gem

Solves what head and tail can't with deterministic evenly-spaced sampling.

Strengths
  • Deterministic evenly-spaced sampling with configurable context windows
  • JSON output mode enables piping into other tools and workflows
Weaknesses
  • Narrow use case that won't replace grep or standard text inspection tools
  • Character-based sampling may misalign with logical code structures
Target Audience

Developers working with large logs, code files, or text dumps

Post Description

I kept wanting a way to quickly orient myself in large files before searching them. Instead of searching, this CLI opens evenly spaced "windows" through a file and shows the surrounding context.

Github: https://github.com/firasd/venetianblinds

It turned out to be surprisingly useful on both source code and long text.

Usage:

npx github:firasd/venetianblinds --samples=5 reactdomroot.js # venetianblinds

file: reactdomroot.js characters: 12729 samples: 5 context_range: 120

--- sample 1/5 char 0 line 1 col 1 range 0:60 /* * Copyright (c) Meta Platforms, Inc. and affiliates. ^

--- sample 2/5 char 3182 line 106 col 1 range 3122:3242 t: FiberRoot) { this._internalRoot = internalRoot; }

// $FlowFixMe[prop-missing] found when upgrading Flow React ^

--- sample 3/5 char 6364 line 188 col 31 range 6304:6424 nDefaultTransitionIndicator; let transitionCallbacks = null;

// $FlowFixMe[invalid-compare] if (options !== n ^

Similar Projects