-
-
Notifications
You must be signed in to change notification settings - Fork 404
Disk usage visualizer #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added my Disk Usage Visualizer to the list
|
@DhanushNehru Do notify me if any changes are required. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a disk usage visualization tool that analyzes directory sizes and displays the largest folders in a command-line interface. The script provides cross-platform compatibility and handles common file system errors gracefully.
- Added a new Python script for analyzing disk usage with CLI arguments
- Created documentation explaining usage and features
- Updated main README to include the new script in the project list
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Added entry for Disk Usage Visualizer to the main script list |
| Disk Usage Visualizer/disk_visualizer.py | New Python script that recursively calculates directory sizes and displays top N largest directories |
| Disk Usage Visualizer/README.md | Documentation for the disk usage visualizer with usage examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Disk Usage Visualizer/README.md
Outdated
| python vis.py | ||
|
|
||
| # Analyze a specific path | ||
| python vis.py D:\Projects # Windows | ||
| python vis.py /home/user/docs # Linux/macOS | ||
|
|
||
| # Show top 20 largest folders | ||
| python vis.py . -n 20 |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename in the usage examples is incorrect. The script is named 'disk_visualizer.py' but the examples reference 'vis.py'.
| python vis.py | |
| # Analyze a specific path | |
| python vis.py D:\Projects # Windows | |
| python vis.py /home/user/docs # Linux/macOS | |
| # Show top 20 largest folders | |
| python vis.py . -n 20 | |
| python disk_visualizer.py | |
| # Analyze a specific path | |
| python disk_visualizer.py D:\Projects # Windows | |
| python disk_visualizer.py /home/user/docs # Linux/macOS | |
| # Show top 20 largest folders | |
| python disk_visualizer.py . -n 20 |
Disk Usage Visualizer/README.md
Outdated
| python vis.py | ||
|
|
||
| # Analyze a specific path | ||
| python vis.py D:\Projects # Windows | ||
| python vis.py /home/user/docs # Linux/macOS | ||
|
|
||
| # Show top 20 largest folders | ||
| python vis.py . -n 20 |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename in the usage examples is incorrect. Should be 'disk_visualizer.py' instead of 'vis.py'.
| python vis.py | |
| # Analyze a specific path | |
| python vis.py D:\Projects # Windows | |
| python vis.py /home/user/docs # Linux/macOS | |
| # Show top 20 largest folders | |
| python vis.py . -n 20 | |
| python disk_visualizer.py | |
| # Analyze a specific path | |
| python disk_visualizer.py D:\Projects # Windows | |
| python disk_visualizer.py /home/user/docs # Linux/macOS | |
| # Show top 20 largest folders | |
| python disk_visualizer.py . -n 20 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Did it work? I applied the suggestion @DhanushNehru |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
README.md
Outdated
| | CSV_TO_NDJSON | [CSV to Excel](https://github.com/DhanushNehru/Python-Scripts/tree/main/CSV_TO_NDJSON) | A Python script to convert a CSV to an NDJSON files file. | | ||
| | Currency Script | [Currency Script](https://github.com/DhanushNehru/Python-Scripts/tree/main/Currency%20Script) | A Python script to convert the currency of one country to that of another. | | ||
| | Digital Clock | [Digital Clock](https://github.com/DhanushNehru/Python-Scripts/tree/main/Digital%20Clock) | A Python script to preview a digital clock in the terminal. | | ||
| | Disk Usage Visualizer | [Disk Usage Visualizer](https://github.com/DhanushNehru/Python-Scripts/tree/main/Disk%20Usage%20Visualizer) | A Python Script to display the top N files taking up space in your disk. |
Copilot
AI
Oct 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra spaces before 'A Python Script'. There should be a single space after the pipe character for consistency with other entries.
|
@arceuzvx please solve the above 2 |
|
@DhanushNehru it should be ok now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
README.md
Outdated
| | CSV_TO_NDJSON | [CSV to Excel](https://github.com/DhanushNehru/Python-Scripts/tree/main/CSV_TO_NDJSON) | A Python script to convert a CSV to an NDJSON files file. | | ||
| | Currency Script | [Currency Script](https://github.com/DhanushNehru/Python-Scripts/tree/main/Currency%20Script) | A Python script to convert the currency of one country to that of another. | | ||
| | Digital Clock | [Digital Clock](https://github.com/DhanushNehru/Python-Scripts/tree/main/Digital%20Clock) | A Python script to preview a digital clock in the terminal. | | ||
| | Disk Usage Visualizer | [Disk Usage Visualizer](https://github.com/DhanushNehru/Python-Scripts/tree/main/Disk%20Usage%20Visualizer) | A Python Script to display the top N files taking up space in your disk. |
Copilot
AI
Oct 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'Script' to 'script' for consistency with other entries in the table.
| | Disk Usage Visualizer | [Disk Usage Visualizer](https://github.com/DhanushNehru/Python-Scripts/tree/main/Disk%20Usage%20Visualizer) | A Python Script to display the top N files taking up space in your disk. | |
| | Disk Usage Visualizer | [Disk Usage Visualizer](https://github.com/DhanushNehru/Python-Scripts/tree/main/Disk%20Usage%20Visualizer) | A Python script to display the top N files taking up space in your disk. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PR Title
Disk Usage Visualizer
Summary
A simple Python script that scans directories and displays the largest folders or files by disk usage. Added the script and a readme file to it.
Description
This PR introduces a new Python script named disk_visualizer.py, which analyzes and displays disk usage in a directory. It recursively calculates the size of all subdirectories and prints the top N largest ones in a neatly formatted CLI output.
The changes are as follows:
Checks
This PR closes issue #492
in the repository
in the PR
Thank You,
Shreya Dutta
Tested on Windows and Linux environments.