A Python package for cleaning up cluttered files and organizing them into respective folders.
Project description
PiFolderOrganizer
PiFolderOrganizer is a Python package that helps organize files into different categories based on their file extensions.
Installation
You can install PiFolderOrganizer using pip:
pip install pi-folder-organizer
Usage
To use PiFolderOrganizer in your Python code, import the PiFolderOrganizer class:
from pi_folder_organizer import PiFolderOrganizer
Make object of class
pi_organizer=PiFolderOrganizer()
To continue with default cleaning:
pi_organizer.pi_folder_organizer("/path/to/source_folder", "/path/to/destination_folder")
If you want to see which folders and extentions I use:
pi_organizer.get_counter()
This will return you a dictionary of folders and the files list as folder's files. Same for getting extensions
pi_organizer.get_extensions()
This will return you a dictionary of folders and the files tuple of file's extensions.
Customization Options
You can customize the counter dictionary and extensions dictionary according to your preferences. Here's how:
from pi_folder_organizer import PiFolderOrganizer
# Initialize PiFolderOrganizer
pi_organizer = PiFolderOrganizer()
# Customize the counter dictionary
new_counter = {
"Images": [],
"Documents": []
}
# Set the new counter
pi_organizer.set_counter(new_counter)
print("Updated Counter:", pi_organizer.get_counter())
# Customize the extensions dictionary
new_extensions = {
"Images": (".png", ".jpg"),
"Documents": (".txt", ".docs")
}
# Set the new extensions
pi_organizer.set_extensions(new_extensions)
print("Updated Extensions:", pi_organizer.get_extensions())
# Run the PiFolderOrganizer method after your setup
pi_organizer.pi_folder_organizer("source_folder", "destination_folder")
Note
The length of new_counter
and new_extensions
must be same. The remaining files automatically moved to folder Others
.
Contact Information
Feel free to reach out to me on social media:
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
File details
Details for the file pi-folder-organizer-2.1.0.tar.gz
.
File metadata
- Download URL: pi-folder-organizer-2.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f9f5a0424c23ce586e29f477e262c6014ec486c3c131aa1afd5f601cc8e57f6 |
|
MD5 | 8d350d09877bbadf0d54197527031ac4 |
|
BLAKE2b-256 | ecd7bc415aabb5275c007979a6731d9446ffa2fce1fbed2d68b5d88c4107164c |
File details
Details for the file pi_folder_organizer-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: pi_folder_organizer-2.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da0eefcae4f6da34f3a000d9b9413ede9f3a249f2c9335434798b8fed8153a47 |
|
MD5 | 03d554cbb1a8f00d52dc79979ab3bc9a |
|
BLAKE2b-256 | 368f4f85c6ea83cb77b9baf1a8c38033c71ad6a084a0a9e7ac09c61aa75c4d77 |