How sahiliot/packflow works
PackFlow is an offline desktop app for composing and printing A4 packing instructions. Factory users choose or edit instructions, optionally apply a template or customize the layout, review the preview, then select a printer and print or export to PDF. Its main domain stages are instruction/template management, document layout, rendering, and print delivery; local SQLite storage preserves instructions and settings. Edges follow explicit README statements and sampled imports/calls; some UI wiring is supported only by the source index, and unsampled internals are not inferred.
Main entry points: main_window.py Main workflow window · main.py Application entry · layout_editor.py Visual layout editor · printing.py Printer and PDF output
Components 17
Desktop workflow
- Application entry
main.py - Main workflow window
app/ui/main_window.py - Instruction editor
app/ui/instruction_dialog.py - Template dialog
app/ui/template_dialog.py - Visual layout editor
app/ui/layout_editor.py - Preview widgets
app/ui/widgets.py - Application styles
app/ui/styles.py
Instructions and layouts
- Instruction records
app/models.py - Automatic pagination
app/layout.py - Packing symbols
app/symbols.py
Preview and printing
- Document renderer
app/renderer.py - Printer and PDF output
app/printing.py
Local data
- SQLite storage
app/database.py - User data paths
app/paths.py - Printer diagnostics
app/selftest.py
Other components
- Factory user
- Windows printer
Connections 27
- Factory user → Application entry: launches
README.md - Application entry → User data paths: locates data
main.py - Application entry → SQLite storage: opens storage
main.py - Application entry → Main workflow window: starts workflow
main.py - Application entry → Application styles: loads styles
main.py - Factory user → Main workflow window: selects instructions
README.md - Main workflow window → SQLite storage: reads and saves
app/ui/main_window.py - Main workflow window → Instruction editor: opens editor
app/ui/main_window.py - Main workflow window → Template dialog: manages templates
app/ui/main_window.py - Main workflow window → Visual layout editor: opens editor
app/ui/main_window.py - Main workflow window → Automatic pagination: builds document
app/ui/main_window.py - Main workflow window → Preview widgets: updates preview
app/ui/main_window.py - Main workflow window → Printer and PDF output: requests printing
app/ui/main_window.py - Instruction editor → Instruction records: edits records
app/ui/instruction_dialog.py - Instruction editor → Preview widgets: shows preview
app/ui/instruction_dialog.py - Visual layout editor → Document renderer: draws elements
app/ui/layout_editor.py - Visual layout editor → Instruction records: edits document
app/ui/layout_editor.py - Visual layout editor → Automatic pagination: uses layout
app/ui/layout_editor.py - Preview widgets → Document renderer: renders preview
app/ui/widgets.py - Automatic pagination → Instruction records: creates document
app/layout.py - Document renderer → Packing symbols: draws symbols
app/renderer.py - Printer and PDF output → Document renderer: paints pages
app/printing.py - Printer and PDF output → Windows printer: sends print job
README.md - SQLite storage → Instruction records: stores records
app/database.py - SQLite storage → Packing symbols: seeds defaults
app/database.py - Application entry → Printer diagnostics: runs diagnostics
main.py - Printer diagnostics → Printer and PDF output: checks printers
app/selftest.py