Skip to main content

A directory tree that caps how many entries are shown per folder.

Project description

treecap

A directory tree that shows the full structure but caps how many entries are shown per folder. The overflow collapses into a ... (N more) line — so a folder with 698 files doesn't drown the rest of the tree.

Unlike tree -L (which limits depth) or tree --filelimit (which hides big directories entirely), treecap always recurses but caps the display width per directory.

Install

pipx install .        # recommended — isolated, on your PATH
# or
pip install -e .      # editable install into the current environment

Usage

treecap                 # current dir, 5 entries per folder
treecap -W 10           # show 10 entries per folder
treecap -L 3            # limit display depth to 3 levels
treecap -W 5 -L 4 data  # 5 per folder, 4 deep, starting at ./data
treecap -a              # include hidden dotfiles
treecap --no-skip       # don't auto-skip .git/node_modules/etc.
treecap > dir.tree      # save to a file

Options

Flag Meaning
-W, --width N Max entries shown per directory (default 5; 0 = unlimited)
-L, --level DEPTH Max display depth (default: unlimited)
-a, --all Include hidden files/dirs
--no-skip Don't skip .git, node_modules, __pycache__, .venv, venv
--version Print version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treecap-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treecap-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file treecap-0.1.0.tar.gz.

File metadata

  • Download URL: treecap-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for treecap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10478d5cc3fb390757299a9e6eaae2f90ce50e041594aa902d0f9eb268e33079
MD5 ca3f129d1057bed28d0df62145358dfd
BLAKE2b-256 5ed06c4d566a225043e7345dbf167db615c0b0f45af3df99795befea91bb919e

See more details on using hashes here.

File details

Details for the file treecap-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: treecap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for treecap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b05389328dddf1383438f61286af085765098cd55aaa243a30b636e4562054e7
MD5 42e91f7b7f743982ada3f10ee780bfda
BLAKE2b-256 a0566072c5471096c1c0f1b0186a185ad84248951ced31c5a13c5f222344e674

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page