Show HN: Venetianblinds.js – evenly spaced windows into text files

2 points by firasd 108 days ago liveclip.substack.com 1 comments
Summary not yet generated for this article.

Original Text

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
                              ^

Comments (1 of ) ⌛

Loading more comments... ⌛
Scroll down to load more comments
No comments available.
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open