Skip to main content

No project description provided

Project description

File Statistics Scanner

A Python script to scan a directory for files with specified extensions, ignoring selected folders, and count:

  • Number of matching files
  • Total lines across all matching files
  • Total characters across all matching files

How It Works

  1. Prompts the user to enter file extensions (e.g., py, js, txt).
  2. Prompts for directory names to ignore (e.g., node_modules, venv).
  3. Recursively scans the current working directory using simple BFS traversal.
  4. Displays statistics for each extension provided.

Installation

pip install adityas-fsscan

Example Run

$ fsscan
Current working directory: /Users/attaditya/projects/code-analyzer
Enter file extensions to scan: 
Please avoid leading dots (e.g., write 'py' instead of '.py').
> py
> js
> 

Enter directories to ignore (optional): 
Please avoid leading slashes (e.g., write 'node_modules' instead of '/node_modules').
> node_modules
> 

Data for py:
  Files: 12
  Lines: 1893
  Chars: 55120
Data for js:
  Files: 8
  Lines: 1104
  Chars: 30792

Project Structure

.
├── main.py                # Entry point
├── count_data.py          # Contains CountData dataclass
├── file_scanner.py        # scan_files() implementation

Requirements

  • Python 3.8+

(No external dependencies required)

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

adityas_fsscan-1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

adityas_fsscan-1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file adityas_fsscan-1.0.tar.gz.

File metadata

  • Download URL: adityas_fsscan-1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for adityas_fsscan-1.0.tar.gz
Algorithm Hash digest
SHA256 496f26f59c4b04b47e8f03d99951710f9f13d0f0de80b6fcbbb6ff0999bad93e
MD5 47d14fcd2965d80561d401d0738c319d
BLAKE2b-256 c36fa2c413201401e4c9d61a069491edb66c6b5e798f7870780f8c25b44efa29

See more details on using hashes here.

File details

Details for the file adityas_fsscan-1.0-py3-none-any.whl.

File metadata

  • Download URL: adityas_fsscan-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for adityas_fsscan-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3380520b9a82c792f22989100457a875ea9cf05151cc8d0dfb69d641bc0dd19
MD5 b489117379c32c75460ea8d535bd43d4
BLAKE2b-256 181945f8e893e7158832b7eaf24c83c362a6535477b90bd10a7e497c815d0558

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