How rhalkyard/hpplot works
hpplot is a command-line sender for HPGL files, with optional stream rewriting and several plotter flow-control modes. The main workflow parses options, reads and filters the file, configures the serial connection, sends blocks while tracking progress, and resets the plotter connection afterward. The implementation is concentrated in one source file, so several responsibilities share that path. The graph is based on the supplied excerpt and README; no separate filter or transport modules are present.
Main entry points: __main__.py CLI entrypoint
Components 13
CLI workflow
- CLI entrypoint
hpplot/__main__.py - HPGL input
- Progress display
hpplot/__main__.py
HPGL processing
- Stream cleanup
hpplot/__main__.py - Command rewriting
hpplot/__main__.py
Plotter transport
- Flow setup
hpplot/__main__.py - Block transfer
hpplot/__main__.py - Buffer query
hpplot/__main__.py - Abort and reset
hpplot/__main__.py
Other components
- User
- Serial port
- HPGL plotter
- Terminal
Connections 16
- User → CLI entrypoint: provides options
README.md - HPGL input → CLI entrypoint: provides file
README.md - CLI entrypoint → Stream cleanup: reads and cleans
hpplot/__main__.py - CLI entrypoint → Command rewriting: applies options
hpplot/__main__.py - CLI entrypoint → Serial port: opens port
hpplot/__main__.py - CLI entrypoint → Flow setup: selects mode
hpplot/__main__.py - Flow setup → Serial port: configures
hpplot/__main__.py - CLI entrypoint → Block transfer: sends blocks
hpplot/__main__.py - Block transfer → HPGL plotter: writes HPGL
hpplot/__main__.py - Block transfer → Buffer query: queries space
hpplot/__main__.py - Buffer query → Serial port: reads and writes
hpplot/__main__.py - Serial port → HPGL plotter: communicates
README.md - CLI entrypoint → Progress display: updates display
hpplot/__main__.py - Progress display → Terminal: prints status
hpplot/__main__.py - CLI entrypoint → Abort and reset: handles interrupt
hpplot/__main__.py - Abort and reset → Serial port: aborts and resets
hpplot/__main__.py