Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lpcodes/sizecalculator
Size Calculator is a Python package that calculates the size of a file or folder and prints it in bytes, kilobytes, and megabytes.
https://github.com/lpcodes/sizecalculator
calculator file files filesize python size-calculation sizes
Last synced: about 2 months ago
JSON representation
Size Calculator is a Python package that calculates the size of a file or folder and prints it in bytes, kilobytes, and megabytes.
- Host: GitHub
- URL: https://github.com/lpcodes/sizecalculator
- Owner: LpCodes
- Created: 2024-01-22T08:15:35.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-01-28T08:36:39.000Z (11 months ago)
- Last Synced: 2024-11-06T05:52:12.592Z (about 2 months ago)
- Topics: calculator, file, files, filesize, python, size-calculation, sizes
- Language: Python
- Homepage: https://pypi.org/project/sizecalculator/
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Size Calculator
Size Calculator is a Python package that calculates the size of a file or folder and prints it in bytes, kilobytes, and megabytes.
## Installation
You can install the package using pip:
```bash
pip install sizecalculator
```
Url : https://pypi.org/project/sizecalculator/
## UsageOnce installed, you can use the `sizecalculator` command from the command line:
```bash
sizecalculator /path/to/your/file_or_folder
```Replace `/path/to/your/file_or_folder` with the actual path of the file or folder you want to analyze.
### Using `print_size` in Your Python Script
You can also use the `print_size` function in your Python scripts or projects. Here's an example:
```python
from sizecalculator import print_sizefile_or_folder_path = "/path/to/your/file_or_folder"
print_size(file_or_folder_path)
```Replace `/path/to/your/file_or_folder` with the actual path of the file or folder you want to analyze.
## Example
```bash
sizecalculator /path/to/your/file_or_folder
```This will print the size of the specified file or folder in bytes, kilobytes, and megabytes.
The size information will be displayed in human-readable format, including bytes, kilobytes, and megabytes.
## Contributing
If you would like to contribute to this project, I welcome your input! Feel free to submit pull requests for bug fixes, feature additions, or any improvements you think would benefit the project.
### Improving Documentation
If you notice areas of the documentation that can be enhanced or rewritten for better clarity, I encourage you to:
1. Fork the repository.
2. Create a new branch for your changes: `git checkout -b improve-documentation`.
3. Make your changes and commit them: `git commit -m 'Improve documentation'`.
4. Push to the branch: `git push origin improve-documentation`.
5. Open a pull request and describe the changes you've made.### Suggestions for Improvement
If you have suggestions for the README or any other part of the project, but you're not sure how to implement them, you can also open an issue to discuss your ideas.
I appreciate your contributions and efforts to make this better!