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
- Prompts the user to enter file extensions (e.g., py, js, txt).
- Prompts for directory names to ignore (e.g., node_modules, venv).
- Recursively scans the current working directory using simple BFS traversal.
- 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)
Release files for adityas-fsscan 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adityas_fsscan-1.0.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adityas_fsscan-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / adityas_fsscan-1.0.tar.gz
| Download URL | adityas_fsscan-1.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
496f26f59c4b04b47e8f03d99951710f9f13d0f0de80b6fcbbb6ff0999bad93e
|
|
BLAKE2b-256 checksum How to use checksums |
c36fa2c413201401e4c9d61a069491edb66c6b5e798f7870780f8c25b44efa29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / adityas_fsscan-1.0-py3-none-any.whl
| Download URL | adityas_fsscan-1.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3380520b9a82c792f22989100457a875ea9cf05151cc8d0dfb69d641bc0dd19
|
|
BLAKE2b-256 checksum How to use checksums |
181945f8e893e7158832b7eaf24c83c362a6535477b90bd10a7e497c815d0558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|