Skip to main content

Directory summary tool with powerful grouping, and recursive searching

Project description

📂 lsum-enhanced

PyPI version Python Version License: MIT Code Style: Black lsum-enhanced (List Summary Enhanced) is a high-performance, visually rich CLI directory analysis tool that transforms standard file listings into actionable intelligence.

⚡ TL;DR

lsum-enhanced is ls on steroids. It doesn't just list files; it categorizes, counts, and visualizes your directory's distribution by MIME types, extensions, and metadata—all while respecting your .gitignore rules.


🤔 Why lsum-enhanced?

Standard tools like ls or tree are great for finding files, but they fail to answer higher-level questions about your workspace. lsum-enhanced was built to fill that gap:

  • Audit Your Assets: Instantly see how many gigabytes of images vs. text files you have.
  • Visualize Structure: Group files into elegant, color-coded panels based on their actual content (MIME) rather than just extensions.
  • Clean Analysis: Use the --gitignore flag to strip out node_modules, build artifacts, and logs, focusing only on the code that matters.
  • Recursive Intelligence: Understand the composition of entire project trees in a single, formatted view.

[!NOTE] lsum-enhanced is under active development


🚀 Installation

Pre-Requisites

This package depends on python-magic, which requires libmagic.

If not installed already, install it using -

Linux
sudo apt install libmagic1
macOS
brew install libmagic

🛠️ Building From Source

Perfect for developers who want the latest features:

# Clone the repository
git clone https://github.com/DMcCallum83/lsum-enhanced.git
cd lsum-enhanced

# Install dependencies
sudo apt install libmagic1
# or for macOS
brew install libmagic
# then build
uv build

# test your dev build
uv run lse .

🛠️ Usage Examples

1. Basic Listing

A clean, tabular view of your current directory:

lse

2. Group by MIME Type (with Icons)

See your files grouped by their actual content type (e.g., Image, Video, Text):

lse --group
lse -g

3. Respect Gitignore

Exclude build artifacts and ignored files for a "clean" summary:

lse . --gitignore --count
lse . -gi -c

4. Recursive Extension Summary

Analyze every file in your project tree, grouped by extension:

lse . --recursive --group-extension
lse . -r -ge

5. Advanced Sorting & Filtering

Find all .txt files and sort them by size:

lse --filter-extension .txt --sort size
lse -fe .txt -s size

⌨️ CLI Options

Option Shorthand Description
--count -c Count files/directories in groups or total.
--group -g Group files by MIME type.
--group-extension -ge Group files by file extension.
--gitignore -gi Respect .gitignore rules (excludes ignored files).
--recursive -r Perform operations on all subdirectories.
--sort -s Sort by name, size, or date.
--filter -f Filter by a specific MIME type (e.g., image/jpeg).
--filter-text -ft Filter filename.

📄 License

Distributed under the MIT License. See LICENSE for more information.


Built with ❤️ using Python and Rich.

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

lsum_enhanced-1.0.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

lsum_enhanced-1.0.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file lsum_enhanced-1.0.1.tar.gz.

File metadata

  • Download URL: lsum_enhanced-1.0.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for lsum_enhanced-1.0.1.tar.gz
Algorithm Hash digest
SHA256 296162e601ed7d1782ccde393ef9a2cff9bf59159bd05520ba39e2aeb261d911
MD5 156abaf1baa15806537921423aa5d702
BLAKE2b-256 41b0af6a42bc9c3bdf2bf1b7535b0ae8640a80894c76a6555ab96b9cd5e1bc3d

See more details on using hashes here.

File details

Details for the file lsum_enhanced-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: lsum_enhanced-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for lsum_enhanced-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b66012c95676130a7e58ba07dc01ffb4dfb38c7f7feb81d2cc7c849c028cf9c3
MD5 2849e20c3df275247ce2d3db531ee414
BLAKE2b-256 4e24ebe538c3cfd2002b8a559bd272652d0c3bc0ffdba46fcf111085edbd24d6

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