Skip to content

Conversation

@arceuzvx
Copy link
Contributor

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:

  • Added my folder for the script
  • Updated main readme to add script to the list

Checks

This PR closes issue #492

in the repository

  • Made no changes that degrades the functioning of the repository
  • Gave each commit a better title (unlike updated README.md) (added extended msg to it)

in the PR

  • Followed the format of the pull_request_template
  • Made the Pull Request in a small level (for the creator's wellfare)
  • Tested the changes you made

Thank You,

Shreya Dutta

linux_test
win_test

Tested on Windows and Linux environments.

arceuzvx and others added 2 commits October 10, 2025 12:54
Added my Disk Usage Visualizer to the list
@arceuzvx
Copy link
Contributor Author

@DhanushNehru Do notify me if any changes are required. :)

Copy link
Contributor

Copilot AI left a 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.

Comment on lines 20 to 27
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
Copy link

Copilot AI Oct 10, 2025

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'.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 27
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
Copy link

Copilot AI Oct 10, 2025

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'.

Suggested change
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

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@arceuzvx
Copy link
Contributor Author

arceuzvx commented Oct 10, 2025

Did it work? I applied the suggestion @DhanushNehru
Like there was apply suggestion button here

Copy link
Contributor

Copilot AI left a 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.
Copy link

Copilot AI Oct 11, 2025

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.

Copilot uses AI. Check for mistakes.
@DhanushNehru
Copy link
Contributor

@arceuzvx please solve the above 2

@arceuzvx
Copy link
Contributor Author

@DhanushNehru it should be ok now.

@DhanushNehru DhanushNehru requested a review from Copilot October 11, 2025 07:01
Copy link
Contributor

Copilot AI left a 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.
Copy link

Copilot AI Oct 11, 2025

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.

Suggested change
| 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.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DhanushNehru DhanushNehru merged commit ce24464 into wasmerio:main Oct 11, 2025
@arceuzvx arceuzvx deleted the disk-visualizer branch October 11, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants