Re: Nouveautés de la version de développement 0.9 and 0.100.0 -0.100.1
https://github.com/qelectrotech/qelectr … r/pull/483
Headless command-line export
Adds a headless (no-GUI) command-line export so projects can be rendered and
exported in batch / CI pipelines without opening the editor. This is a
long-standing request (qelectrotech.org bugtracker #171, GitHub #309; the
list export addresses @pkess's request in #162 to "export all connections as
a list").Usage
qelectrotech --export-pdf <project.qet> <output.pdf> qelectrotech --export-png <project.qet> <output_dir> qelectrotech --export-svg <project.qet> <output_dir> qelectrotech --export-cables <project.qet> <output.csv> qelectrotech --export-wires <project.qet> <output.csv>pdf — one multi-page document, one diagram per page.
png / svg — one file per diagram, named <NN>_<title>.<ext>.
cables — wiring list (one row per conductor) as CSV.
wires — list of distinct wire numbers as CSV.
How it works
The export request is detected in main() before SingleApplication
is created, so a batch run does not attach to / focus a running GUI
instance. A plain QApplication is used (offscreen-capable).
Rendering reuses Diagram::render() over
BorderTitleBlock::borderAndTitleBlockRect() — the same path the GUI export
uses — so output matches the on-screen drawing.
The image/PDF code lives in a new CLIExport namespace
(sources/cli_export.{h,cpp}); main.cpp only gains a small dispatch hook.
List exports
The CSV list exports reuse the existing exporters rather than duplicating
logic:--export-cables → WiringListExport. To make it usable headlessly,
WiringListExport::toCsv() (which mixed CSV generation with a file dialog
and file write) is refactored: a new const method toCsvString() builds and
returns the CSV, and toCsv() now calls it before doing the dialog + write.
No behavioural change to the existing GUI export.
--export-wires → ConductorNumExport::wiresNum() (already a pure string
producer).
Testing
PDF/PNG/SVG verified against native example projects (e.g.
Habitat-Schemas_developpes.qet) — output opens and matches the GUI render.
--export-cables / --export-wires verified end-to-end: both exit 0 and
produce the same CSV the GUI exporters produce.
https://github.com/qelectrotech/qelectr … r/pull/485
CLI export: don't draw the editor grid in PDF/PNG/SVG output
#485
https://github.com/qelectrotech/qelectr … r/pull/488
Fix “Exclude from auto-numbering” and “Potential isolation” tick boxes fault #482
Closed
Potential Isolation option for terminals #471
