Metadata-Version: 2.1
Name: globalutil
Version: 0.3.5
Summary: A global utility package for all the data sorting and inspection needs.
Home-page: https://github.com/UYousafzai/gutil
Author: Umar Khan
Author-email: Umar Khan <umaryousafzai9@gmail.com>
License: MIT License
        
        Copyright (c) [2024] [UmarKhan]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/UYousafzai/gutil
Project-URL: Bug Tracker, https://github.com/UYousafzai/gutil/issues
Keywords: utility,filesystem,sorting,inspection,global
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# 🌟 gutil: Your Global Utility Toolkit 🛠️

![Python Version](https://img.shields.io/badge/python-3.6%2B-blue)
![License](https://img.shields.io/badge/license-MIT-green)

Welcome to `gutil`, your one-stop solution for all your file and directory management needs! 🚀

## 🌈 Features

- 📁 **Directory Inspection**: Generate beautiful tree structures of your directories
- 🔍 **Smart File Sorting**: Copy files with ease using powerful wildcard patterns
- 🔎 **File Search**: Find files matching specific criteria across directories
- 📊 **File Organization**: Categorize files based on their types
- 🔄 **Duplicate Detection**: Identify and manage duplicate files
- 📏 **Large File Finder**: Locate files exceeding specified size thresholds
- 📝 **Metadata Extraction**: Extract and display file metadata
- 📊 **Directory Size Calculator**: Calculate total size of directories
- 🧹 **Empty Directory Cleaner**: Identify and remove empty directories
- 💾 **File Backup**: Create timestamped backups of files and directories
- 🗜️ **File Archiving**: Create and extract zip archives
- 🔐 **File Integrity**: Calculate and verify file checksums
- 🕒 **Recent File Finder**: Locate recently modified or created files
- 🏷️ **Batch File Renaming**: Rename multiple files based on patterns
- 🔧 **Extensible Design**: Built with future expansion in mind

## 🎯 Vision

`gutil` is on a mission to become the Swiss Army knife of utility packages. We've expanded our capabilities to cover a wide range of file and directory operations!

## 🚀 Quick Start

### Installation

```bash
pip install globalutil (currently unavailable, in publishing)
```


### Use Case
# gutil

gutil is a Python library that provides utilities for file system operations, including file analysis, searching, organizing, and more.

## Installation

You can install gutil using pip:

```bash
pip install globalutil
```

## Usage

## Example Use Case: Preparing Files for LLM Upload

When working with Large Language Models (LLMs), it's often useful to have all relevant files in a single location and to have a clear understanding of the project structure. Here's how you can use gutil to prepare your files for LLM upload:

from local package
```python
from gutil.filesystem import Inspect, Sort

# Collect all Python files into a single folder
structure = Inspect.generate_copy_structure("./", "./temp")
Sort.copy_structure(structure, patterns=["*.py"])

# Generate a tree structure of your project
tree = Inspect.get_directory_tree(".")
with open("tree.txt", "w") as f:
    f.write(tree)
```


This code will:
1. Copy all .py files from the current directory and its subdirectories into a "./temp" folder.
2. Generate a tree structure of the current directory and save it to "tree.txt".

Now you have:
- All your Python files collected in the "./temp" folder, ready for easy upload to the LLM.
- A "tree.txt" file that provides a clear overview of your project structure, which you can also share with the LLM to give it context about your project organization.

This approach makes it easy to provide the LLM with both your code files and a structural overview of your project, enabling more informed and context-aware interactions.


## 📚 Documentation

For detailed documentation, visit our [GitHub Pages](https://uyousafzai.github.io/gutil/).

## 📜 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🌟 Show Your Support

If you find this project useful, give it a star on GitHub! ⭐
---
