$ show openscopeproject/InteractiveHtmlBom
InteractiveHtmlBom is a mature, production‑stable application that generates self‑contained interactive HTML Bill of Materials (BOM) documents from PCB design files. It supports multiple Electronic Design Automation (EDA) tools including KiCad, Eagle, EasyEDA, Fusion 360, and Allegro via a modular parser architecture (EcadParser strategy pattern). The application provides both a command‑line interface for headless generation and a wxPython‑based settings dialog that integrates as a KiCad plugin. The output HTML includes a full interactive viewer with BOM table, layer toggling, board rotation, dark mode, net highlighting, and export capabilities, all embedded within a single file for offline use. The codebase is well‑organized into separate packages for EDA parsing, core generation logic, and web frontend assets, with a JSON schema defining the intermediate PCB data format. While the project shows strong engineering practices, there are some signs of technical drift such as KiCad version workarounds, deprecated wxPython usage, and a large monolithic JavaScript frontend that lacks unit tests.
The LLM identified 3 files worth highlighting for reuse:
Defines the abstract EcadParser base class with parse(), get_extra_field_data(), and add_drawing_bounding_box() methods. Concrete implementations for different EDA tools (KiCad, Eagle, EasyEDA, etc.) inherit from this, enabling a clean strategy pattern that decouples parsing logic from the BOM generation core. The interface is self-contained and could be extracted as a pattern for any multi-format data extraction task.
Parses SVG path 'd' attribute strings into structured commands (moveto, lineto, curveto, etc.). The module is dependency-free and implements full SVG path specification parsing with closures, making it directly reusable for any project needing SVG path interpretation. Its self-contained nature and precise handling of edge cases (implicit coordinates, relative/absolute) demonstrate high craftsmanship.
A pure-Python implementation of the Lempel-Ziv string compression algorithm, mirroring the JavaScript lz-string library used in the frontend. The module encodes and decodes strings to/from a compressed format suitable for embedding large PCB data in the HTML output. It is fully self-contained, has no external dependencies, and can be extracted for use in any project needing lossless string compression.