How romantrnt/zipsearch works
ZipSearch is an offline terminal application for searching ZIP collections in place. Users start through the CLI or keyboard-driven TUI, choose literal, regex, SMART, or advanced-query behavior, and receive archive/member/record matches for inspection or export. Searches scan source archives directly or use an optional candidate index; indexed candidates are reopened and verified against original archive data. The graph covers the documented data formats and inspection features, but some subsystem links are documented rather than visible in the sampled implementation excerpts.
Main entry points: tui.py Interactive TUI · cli.py CLI commands · engine.py Archive search engine · grouping.py Result grouping
Components 16
User interfaces
- CLI commands
src/zipsearch/cli.py - Interactive TUI
src/zipsearch/tui.py - UI state
src/zipsearch/state.py
Search and extraction
- Archive search engine
src/zipsearch/engine.py - Advanced query parser
src/zipsearch/query.py - SMART matching
src/zipsearch/smart.py - ZIP collection
- Structured member readers
src/zipsearch/engine.py
Index and planning
- Search planner
src/zipsearch/execution.py - Candidate index
src/zipsearch/index.py
Results and inspection
- Search data models
src/zipsearch/models.py - Entity extraction
src/zipsearch/entities.py - Result grouping
src/zipsearch/grouping.py - CLI rendering
src/zipsearch/render.py - Archive inspection
src/zipsearch/cli.py
Other components
- Terminal user
Connections 25
- Terminal user → CLI commands: runs commands
README.md - Terminal user → Interactive TUI: inspects interactively
README.md - CLI commands → Search planner: plans search
src/zipsearch/cli.py - CLI commands → Interactive TUI: opens TUI
src/zipsearch/cli.py - CLI commands → Candidate index: manages index
src/zipsearch/cli.py - CLI commands → CLI rendering: renders matches
src/zipsearch/cli.py - CLI commands → Result grouping: groups results
src/zipsearch/cli.py - CLI commands → Archive inspection: inspects directory
README.md - Interactive TUI → UI state: persists preferences
src/zipsearch/tui.py - Search planner → Candidate index: looks up candidates
src/zipsearch/execution.py - Search planner → Archive search engine: scans archives
src/zipsearch/execution.py - Candidate index → ZIP collection: indexes metadata
README.md - Archive search engine → ZIP collection: reads members
README.md - Archive search engine → SMART matching: matches SMART
src/zipsearch/engine.py - Archive search engine → Advanced query parser: evaluates advanced queries
src/zipsearch/engine.py - Archive search engine → Structured member readers: reads structured data
README.md - Archive search engine → Search data models: produces matches
src/zipsearch/engine.py - Result grouping → Entity extraction: extracts entities
src/zipsearch/grouping.py - Result grouping → SMART matching: normalizes phones
src/zipsearch/grouping.py - CLI rendering → Search data models: formats matches
src/zipsearch/render.py - Interactive TUI → Archive search engine: searches archives
README.md - Interactive TUI → Result grouping: groups occurrences
src/zipsearch/tui.py - Interactive TUI → Entity extraction: navigates entities
README.md - Interactive TUI → Candidate index: shows index status
src/zipsearch/tui.py - Interactive TUI → Search data models: inspects results
src/zipsearch/tui.py