How stormforgeventures/pifang works
Pifang is a local-first media-processing CLI, also usable as a Python library. The main workflow is a user command entering the CLI, which dispatches a domain operation and returns files plus text or structured JSON results. Image, document, video, and transcription commands are distinct product stages; recipes, pipes, and batch runs provide alternate ways to orchestrate operations. Edges use README documentation and the supplied source index or excerpts; unsampled document and metadata implementations are represented at their existing directories, with relationships omitted where evidence is limited.
Main entry points: main.py Command interface · image/ops.py Image operations · batch.py Batch processing · video/ops.py Video operations
Components 24
CLI and results
- Command interface
src/pifang/cli/main.py - Results and errors
src/pifang/core/result.py
Workflow tools
- Recipe runner
src/pifang/core/recipe.py - Image pipe runner
src/pifang/core/pipe.py - Video pipe runner
src/pifang/core/video_pipe.py - Batch processing
src/pifang/core/batch.py - Batch manifest
src/pifang/core/manifest.py
Image processing
- Image operations
src/pifang/domains/image/ops.py - Image analysis
src/pifang/domains/image/analyze.py - Background tools
src/pifang/domains/image/bg.py - Recoloring
src/pifang/domains/image/recolor.py - Image packs
src/pifang/domains/image/packs.py - Platform presets
src/pifang/domains/image/platforms.py
Documents and text
- Document conversion
src/pifang/domains/doc - Text utilities
src/pifang/domains/text - Metadata indexing
src/pifang/domains/meta/index.py
Video and transcription
- Video operations
src/pifang/domains/video/ops.py - Video information
src/pifang/domains/video/info.py - ffmpeg tools
src/pifang/domains/video/ffmpeg.py - Transcription workflow
src/pifang/domains/transcribe/ops.py - Whisper engine
src/pifang/domains/transcribe/engine.py - Transcript formats
src/pifang/domains/transcribe/formats.py
Other components
- Local user
- Local files
Connections 41
- Local user → Command interface: runs commands
README.md - Command interface → Results and errors: formats results
src/pifang/cli/main.py - Command interface → Image operations: dispatches image
src/pifang/cli/main.py - Command interface → Image analysis: dispatches analysis
src/pifang/cli/main.py - Command interface → Background tools: dispatches background
src/pifang/cli/main.py - Command interface → Document conversion: dispatches documents
src/pifang/cli/main.py - Command interface → Text utilities: dispatches text
src/pifang/cli/main.py - Command interface → Metadata indexing: dispatches metadata
src/pifang/cli/main.py - Command interface → Video operations: dispatches video
README.md - Command interface → Transcription workflow: dispatches transcription
README.md - Command interface → Recipe runner: runs recipes
src/pifang/cli/main.py - Command interface → Image pipe runner: runs image pipes
README.md - Command interface → Video pipe runner: runs video pipes
src/pifang/cli/main.py - Command interface → Batch processing: runs batches
src/pifang/cli/main.py - Command interface → Local files: reads and writes
README.md - Recipe runner → Image operations: calls image operations
src/pifang/core/recipe.py - Recipe runner → Video operations: calls video operations
src/pifang/core/recipe.py - Image pipe runner → Image operations: runs stages
src/pifang/core/pipe.py - Video pipe runner → Video operations: runs stages
src/pifang/core/video_pipe.py - Batch processing → Image operations: runs image jobs
src/pifang/core/batch.py - Batch processing → Video operations: runs video jobs
src/pifang/core/batch.py - Batch processing → Recipe runner: runs recipes
src/pifang/core/batch.py - Batch processing → Image pipe runner: runs image pipes
src/pifang/core/batch.py - Batch processing → Video pipe runner: runs video pipes
src/pifang/core/batch.py - Batch processing → Batch manifest: writes entries
src/pifang/core/batch.py - Image packs → Image operations: creates variants
src/pifang/domains/image/packs.py - Image packs → Platform presets: uses presets
src/pifang/domains/image/packs.py - Image analysis → Image operations: uses operations
src/pifang/domains/image/analyze.py - Background tools → Image operations: uses image helpers
src/pifang/domains/image/bg.py - Recoloring → Background tools: uses background tools
src/pifang/domains/image/recolor.py - Recoloring → Image operations: uses image operations
src/pifang/domains/image/recolor.py - Video operations → ffmpeg tools: runs media commands
src/pifang/domains/video/ops.py - Video operations → Video information: probes media
src/pifang/domains/video/ops.py - Video information → ffmpeg tools: calls ffprobe
src/pifang/domains/video/info.py - Transcription workflow → Whisper engine: transcribes audio
src/pifang/domains/transcribe/ops.py - Transcription workflow → Transcript formats: writes subtitles
src/pifang/domains/transcribe/ops.py - Transcription workflow → ffmpeg tools: extracts video audio
src/pifang/domains/transcribe/ops.py - Transcription workflow → Local files: writes transcripts
README.md - Video operations → Local files: writes media
README.md - Image operations → Local files: writes images
README.md - Document conversion → Local files: writes documents
README.md