CLI tool for image processing and uploading to cloud storage.
Project description
PicFlow
PicFlow is a command-line tool for automating image processing (scaling/compression) and uploading to cloud storage (e.g., Qiniu Cloud). Supports Windows, Linux, and macOS.
Features
🛠️ Core Capabilities
- Image Processing
- Scaling, format conversion (JPEG/PNG/WebP)
- Quality compression (based on
cwebpandImageMagick)
- Cloud Storage Integration
- Supports Qiniu Cloud, AWS S3 (planned)
- Auto-generates CDN URLs
- Batch Operations
- Recursively process folders
- Parallel task acceleration
🚀 Efficiency
- Config-Driven: Manage cloud keys and parameters via YAML
- Cross-Platform: Run the same command on Windows/Linux/macOS
Installation
Prerequisites
- Python 3.8+
- External Tools (auto-detected):
- ImageMagick (scaling)
- cwebp (WebP compression)
- qshell (Qiniu upload)
Install PicFlow
pip install picflow
Quick Start
1. Configure Qiniu
Create config file ~/.picflow/config.yaml:
storage:
qiniu:
access_key: "YOUR_ACCESS_KEY"
secret_key: "YOUR_SECRET_KEY"
bucket: "YOUR_BUCKET_NAME"
domain: "https://cdn.example.com" # CDN domain
2. Process & Upload Images
# Compress to WebP and upload
picflow process --format webp --quality 85 ~/images/photo.jpg
# Process entire folder recursively
picflow batch ~/gallery --scale 50% --output ~/compressed_gallery
Advanced Configuration
Custom Processing
processing:
default_quality: 90
formats:
webp:
method: 6 # Compression method level
jpeg:
progressive: true # Progressive JPEG
CLI Options
# Show help
picflow --help
# Override quality parameters in configuration
picflow process input.png --quality 75 --format jpeg
Contributing
Issues and PRs are welcome!
- Code Style: Follow PEP8
- Testing: Add pytest unit tests
- Docs: Update English or Chinese documentation
License
Licensed under the MIT License.
Project details
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 picflow-0.1.4.tar.gz.
File metadata
- Download URL: picflow-0.1.4.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b96147f675fcd712e96c271723452fd2b0134930cc1cfbd4cf70af290160077
|
|
| MD5 |
c8d75828683b6400c7ecb1e0daf6f8ff
|
|
| BLAKE2b-256 |
44b8dd2741fe363188c5da45d1c09fb34e0d86676f0271b196559e0f6d78cae2
|
File details
Details for the file picflow-0.1.4-py3-none-any.whl.
File metadata
- Download URL: picflow-0.1.4-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
816230a1ad35338d8cc399ef49bb39f37c7c0b6e9a5c182ee2c5e121a4386116
|
|
| MD5 |
c2f8d5da4065f3c8fe43b1c50c478291
|
|
| BLAKE2b-256 |
00d9c43a1920e5849e79f3e5cd77310cddba6b1a6913ba0c3be1f7f9d14330ed
|