Remix.run Logo
Show HN: Venetianblinds.js – evenly spaced windows into text files(liveclip.substack.com)
2 points by firasd 7 hours ago

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
                              ^