A global utility package for all the data sorting and inspection needs.
Project description
🌟 globalutil: Your Global Utility Toolkit 🛠️
globalutil
currently open source part includes file and folder management scripts. future release will include alot of features for building auto training pipeline scripts (ML Pipelines) for python.
🌈 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
globalutil
could become the Swiss Army knife of ML related utility tools. currently supporting wide range of file and directory operations!
🚀 Quick Start
Installation
pip install globalutil
Usage
globalutil
globalutil is a Python library that provides utilities for file system operations, including file analysis, searching, organizing, and more.
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 globalutil to prepare your files for LLM upload:
from local package
from globalutil.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:
- Copy all .py files from the current directory and its subdirectories into a "./temp" folder.
- 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.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🌟 Show Your Support
If you find this project useful, give it a star on GitHub! ⭐
Project details
Release history Release notifications | RSS feed
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 globalutil-0.4.0.tar.gz
.
File metadata
- Download URL: globalutil-0.4.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e0643591af9879b7780823d37b8c8ef982e1bfd4085825ac75a02a9263c9e32 |
|
MD5 | f4cae973ad160339fb3a6116049a17aa |
|
BLAKE2b-256 | 7f1d0f73f4e91852b38fba1932d3ed6f5923803128fbf7ce533047447e7b0c31 |
File details
Details for the file globalutil-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: globalutil-0.4.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeb0076fd2442c601282c6bd539f17af76725d1152fde47b0395fa57f6674428 |
|
MD5 | adb0fb295bf4036caf88c956ed722735 |
|
BLAKE2b-256 | e5c8a18d9c6fb9cd55140b12fc5cb0570b86077635e90089938653f47428d698 |