How yuxuan1123/octools works
OCTools is a PySide6 desktop toolbox for document conversion and merging, offline translation and speech, and screen-oriented utilities. A user starts the application, selects a built-in tool, supplies files or text, and receives converted or generated output. Conversion is the clearest evidenced workflow: the conversion service tries a registered direct converter, then asks the star router for a fallback route and runs its hops. The README also documents OCR, speech, directory-tree, color-picker, and external-plugin capabilities. The supplied tree omits several README-described UI and translation modules, so their wiring is not inferred here.
Main entry points: pipeline.py Conversion pipeline · main.py Application startup · registry.py Format registry · runner.py Conversion runner
Components 24
Application
- Application startup
main.py - Desktop interface
ui/__init__.py - Business settings
config
Conversion
- Conversion tool
plugins/conversion/tab_conversion.py - Conversion runner
plugins/conversion/runner.py - Conversion pipeline
services/conversion/pipeline.py - Format registry
services/conversion/registry.py - Fallback router
services/conversion/star/router.py - Route executor
services/conversion/star/runner.py - Format metadata
core/formats/registry.py
AI and media
- Document conversion
core/engines/document_engine.py - Presentation conversion
core/engines/presentation_engine.py - Formatted Markdown DOCX
core/engines/md_docx_engine.py - Offline translation
core/engines/translation_engine.py - Speech synthesis
core/engines/tts_engine.py
Built-in tools
- File merging
plugins/merge/runner.py - Directory tree
plugins/tree/tab_tree.py - Screen color picker
plugins/color_pick/tab_color_pick.py - Terminal tool
plugins/terminal/tab_terminal.py
External plugins
- Plugin manager
services/ext_plugins/manager.py - Plugin subprocesses
services/ext_plugins - External plugin
Other components
- Desktop user
- Local files
Connections 26
- Desktop user → Application startup: launches
- Application startup → Desktop interface: opens interface
- Application startup → Plugin manager: starts manager
- Desktop user → Conversion tool: selects tool
- Conversion tool → Conversion runner: starts conversion
- Conversion runner → Conversion pipeline: calls
- Conversion pipeline → Format registry: checks direct route
- Conversion pipeline → Fallback router: requests fallback path
- Conversion pipeline → Route executor: executes fallback
- Fallback router → Format registry: reads converter edges
- Format registry → Format metadata: uses format metadata
- Route executor → Format registry: looks up each hop
- Conversion pipeline → Document conversion: dispatches registered conversion
- Conversion pipeline → Presentation conversion: dispatches registered conversion
- Conversion pipeline → Formatted Markdown DOCX: dispatches registered conversion
- Desktop user → Local files: provides input
- Conversion runner → Local files: reads and writes
- Application startup → Business settings: loads settings
- Application startup → Offline translation: preloads models
- Desktop user → File merging: selects tool
- Desktop user → Directory tree: selects tool
- Desktop user → Screen color picker: selects tool
- Desktop user → Terminal tool: selects tool
- Plugin manager → Plugin subprocesses: manages lifecycle
- Plugin manager → External plugin: discovers and dispatches
- Plugin subprocesses → External plugin: communicates by IPC