Metadata-Version: 2.4
Name: fileorganizer-farhan
Version: 0.1.1
Summary: A tool to organize messy files into categorized folders
Home-page: https://github.com/Farhanahmad-kust/fileorganizer
Author: Farhan Ahmad
Author-email: Farhan Ahmad <farhanbangash091@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Farhanahmad-kust/fileorganizer
Project-URL: Bug Tracker, https://github.com/Farhanahmad-kust/fileorganizer/issues
Keywords: file organization,cleanup,automation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# FileOrganizer

A Python package that organizes messy files in a folder into categorized subfolders.

## Features

- 📁 Automatically categorizes files based on extension
- 🏷️ Supports common file types: images, videos, documents, audio, code, archives
- 🔄 Creates subfolders automatically if they don't exist
- 🔄 Handles duplicate filenames by adding a suffix (_1, _2, etc.)
- 📝 Logs all actions (old path → new path) into a log file
- ↩️ Undo functionality to revert the last organization operation
- 🧰 Simple command-line interface

## Installation

### From PyPI

```bash
pip install fileorganizer-farhan
```

### From Source

```bash
git clone https://github.com/Farhanahmad-kust/fileorganizer.git
cd fileorganizer
pip install -e .
```

## Usage

### Command Line Interface

Organize files in a directory:

```bash
fileorganizer organize /path/to/messy/directory
```

Add the `-v` or `--verbose` flag for detailed output:

```bash
fileorganizer organize /path/to/messy/directory --verbose
```

Undo the last organization operation:

```bash
fileorganizer undo /path/to/organized/directory
```

### As a Python Package

You can also use FileOrganizer in your Python scripts:

```python
from fileorganizer import FileOrganizer

# Initialize the organizer with the target directory
organizer = FileOrganizer("/path/to/messy/directory")

# Organize files
moved_files = organizer.organize()

# Undo the last operation
undone_files = organizer.undo_last_operation()
```

## File Categories

FileOrganizer sorts files into the following categories:

- **images**: .jpg, .jpeg, .png, .gif, .bmp, .svg, .tiff, .webp
- **documents**: .doc, .docx, .pdf, .txt, .rtf, .odt, .md, .csv, .xls, .xlsx, .ppt, .pptx
- **audio**: .mp3, .wav, .flac, .aac, .ogg, .wma, .m4a
- **video**: .mp4, .avi, .mov, .wmv, .mkv, .flv, .webm, .m4v
- **code**: .py, .js, .html, .css, .java, .c, .cpp, .h, .php, .rb, .go, .rs, .ts, .json, .xml
- **archives**: .zip, .rar, .7z, .tar, .gz, .bz2, .xz
- **others**: Any file type not listed above

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
