A toolkit for processing the ASM's Mammal Image Library (MIL).
Project description
mil-kit
A Python toolkit for batch processing the Mammal Image Library (MIL) images. Reshape, convert, and optimize images for the mammal diversity database and other applications.
Features
- 🚀 Batch process multiple PSD files in a directory
- ⚡ Parallel processing for faster execution
- 📊 Progress bar with detailed status
- 📝 Automatically hide all text layers
- 🖼️ Export processed files as PNG (default) or other formats
- 📁 Support for recursive directory processing
- ⚡ Preserve folder structure in output
Installation
Install using pip:
pip install mil-kit
Or using uv:
uv add mil-kit
Usage
Command Line
Process PSD files in a directory:
mil-kit -d /path/to/psd/files
Process recursively, specify output directory, and use JPEG format:
mil-kit -d /path/to/psd/files -o /path/to/output -r -f jpeg
Options
-d, --dir: Input directory containing PSD files (required)-o, --output: Output directory for processed files (default: input directory)-f, --output-format: Output image format (default: png)-r, --recursive: Process subdirectories recursively
Python API
You can also use mil-kit as a Python library:
from mil_kit.psd.processor import PSDProcessor
from mil_kit.job import BatchJob
# Process a single file
processor = PSDProcessor("image.psd")
processor.load()
processor.hide_non_image_layers()
processor.export("output.jpg", format="jpeg")
# Batch process
job = BatchJob(
input_dir="./psd_files",
output_dir="./output",
recursive=True,
output_format="png",
max_workers=4
)
job.run()
Requirements
- Python >= 3.10
- psd-tools >= 1.12.0
- pillow >= 12.0.0
- tqdm >= 4.67.1
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Issues
Report bugs and request features on GitHub Issues.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mil_kit-0.3.0.tar.gz.
File metadata
- Download URL: mil_kit-0.3.0.tar.gz
- Upload date:
- Size: 69.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b05e84e67a52d75d715025194993aea7b742de5a97cdb3db801ab085ba8285b
|
|
| MD5 |
08f3f2a0f5a6aeeaa2f63894e3ee73d9
|
|
| BLAKE2b-256 |
6db8df86010a6bbd2d0a79dc8b185b3674a99f8e81a11a7411957350641ad8e1
|
File details
Details for the file mil_kit-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mil_kit-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba54412e5c6eab6e8b02d08b578fd23987c5a7dd4eac0933f69e990d63ad39c3
|
|
| MD5 |
a3213652a444672c54e8d67e279e7d49
|
|
| BLAKE2b-256 |
80923ef6382013a0b809587159713c457cb36671ffa1e8831c03dca6a8b2efb1
|