Skip to main content

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:

GitHub LinkedIn Twitter Facebook

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

pi_folder_organizer-2.2.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

pi_folder_organizer-2.2.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pi_folder_organizer-2.2.2.tar.gz.

File metadata

  • Download URL: pi_folder_organizer-2.2.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for pi_folder_organizer-2.2.2.tar.gz
Algorithm Hash digest
SHA256 06f0a95d1d3413bc62130a8c6162872ffb91b13590e7402d927c8be0ebe4df4b
MD5 35247fe85f1208420d6f25be9c2bf757
BLAKE2b-256 ff166e47a400f8372355c5ccd990c82f2024add146d77552f53aedca6efc69cd

See more details on using hashes here.

File details

Details for the file pi_folder_organizer-2.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pi_folder_organizer-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 668dc79b74502699d4db4d6b486d9f58b0ff24bfec42909fe9ad47ff1e8b1930
MD5 a4727a3925158dc4437c2c78556db998
BLAKE2b-256 4abc70a059f75e75b4099e7e9161c501117c4d02848c0c523213f305ef3654c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page