How lgarron/folderify works
Main Components
a) Input Processing Layer:
• Command Line Interface (src/main.rs, src/command.rs, src/options.rs)
• Input Validation & Error Handling (src/error.rs)
• Resource Management (src/resources.rs)
b) Core Processing Layer:
• ImageMagick Integration (src/magick.rs)
• Output Path Management (src/output_paths.rs)
• Primitive Types (src/primitives.rs)
c) External Dependencies:
• ImageMagick CLI
• macOS System Tools (iconutil, sips, etc.)
• Optional Tools (fileicon)
┌─────────────────────┐
• Input Layer │
• ┘
• ↓
┌─────────────────────┐
• Processing Layer │
• ┘
• ↓
┌─────────────────────┐
• Output Layer │
• ┘
Component Relationships
• User input → Command parsing → Options validation
Key Elements to Highlight
a) Input Processing:
• PNG mask file input
• Command-line arguments
• macOS version detection
b) Core Processing:
• Image manipulation via ImageMagick
• Size variants generation (16x16 through 512x512@2x)
• Light/dark mode processing
• Badge application (if specified)
c) Output Options:
• .icns file generation
• .iconset folder creation
Technical Details
Annotations for:
• Supported image dimensions (384px height, 128px width multiples)
• Grid system (16px grid)
• Supported macOS versions
• Required system dependencies
• User interaction
• Image processing
• System integration
• File system operations