Releases: nathannncurtis/File-Processor
File Proccesor v1.2
This Python-based program is a file processing tool designed to automatically monitor designated directories, process PDFs and JPEGs, and convert them into optimized TIFF files or JPEG images as specified. It uses watchdog to monitor directories and respond to new files, PyMuPDF for PDF handling, and Pillow for image conversion. The tool is ideal for batch processing large volumes of documents and images with minimal user intervention, making it suitable for automated document management workflows.
Features
Automatic Folder Monitoring: Watches specified directories for new files and folders, triggering processing automatically when new files are detected.
PDF to Multi-Image Conversion:
TIFF Conversion: Converts each page of a PDF into individual TIFF files, with options to convert images to monochrome for reduced file size.
JPEG Conversion: Converts each page of a PDF to individual JPEGs with customizable quality.
JPEG to TIFF Conversion: Converts incoming JPEG images to monochrome TIFF images, optimizing for compact file storage.
Stability Check: Ensures files are fully transferred and stable before processing, reducing errors from partial transfers.
Automatic Cleanup: Removes original PDFs and JPEGs after processing, keeping input directories organized.
Folder Merging in Output: Supports merging processed files into existing folders in the output directory to avoid duplication or nesting.
How It Works
Setup and Monitor: The tool uses watchdog to monitor specified input directories for new files or folders. When a new folder or file appears, it waits until the files are stable (fully transferred).
Process and Convert: Depending on the file type:
PDFs are split into pages, each saved as a TIFF or JPEG.
JPEGs are converted directly to monochrome TIFFs.
Move and Merge: Processed files are moved to an output directory, where folders are merged if they already exist, ensuring a streamlined file structure.
Cleanup: After successful conversion, original PDFs and JPEGs are deleted to maintain a clean input directory.
Technologies
Python: Core language for scripting.
Watchdog: Monitors file system changes.
PyMuPDF: Manages PDF file handling and page conversion.
Pillow (PIL): Manages image manipulation and conversion.