QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
CLIExport Namespace Reference

Headless command-line export. More...

Functions

bool isExportRequest (const QStringList &args)
 True if args request a CLI export (i.e. contain one of the export options).
int run (const QStringList &args)
 Run the CLI export described by args.

Detailed Description

Headless command-line export.

Implements the long-requested batch/headless export (qelectrotech.org bugtracker #171, GitHub #309): render a project's diagrams to files without opening the GUI.

Detected and handled in main() before the GUI is created.

Function Documentation

◆ isExportRequest()

bool CLIExport::isExportRequest ( const QStringList & args)

True if args request a CLI export (i.e. contain one of the export options).

Here is the caller graph for this function:

◆ run()

int CLIExport::run ( const QStringList & args)

Run the CLI export described by args.

Returns
process exit code (0 on success).

Usage: qelectrotech –export-pdf <project.qet> <output.pdf> [–show-terminals] qelectrotech –export-png <project.qet> <output_dir> [–show-terminals] qelectrotech –export-svg <project.qet> <output_dir> [–show-terminals] qelectrotech –export-cables <project.qet> <output.csv> qelectrotech –export-wires <project.qet> <output.csv> qelectrotech –export-bom <project.qet> <output.csv> qelectrotech –export-nets <project.qet> <output.json> qelectrotech –export-links <project.qet> <output.csv> qelectrotech –info <project.qet> [output.json] qelectrotech –check-elements <element.elmt | directory> qelectrotech –resave <project.qet> <output.qet> qelectrotech –set-titleblock <project.qet> <output.qet> key=value...

PDF: one multi-page document (one diagram per page). PNG/SVG: one file per diagram, named <output_dir>/<NN>_<title>.<ext>. –show-terminals: also paint terminal markers (red stroke + blue docking dot) and terminal names, as the interactive editor does; off by default, matching the GUI export dialog's default. Has no effect on the non-image export modes. cables: wiring list (one row per conductor) as CSV. wires: list of distinct wire numbers as CSV. bom: bill of materials (one row per element) as CSV. nets: electrical nets (connected-terminal groups) as JSON. links: element cross-references (coil/contact) as CSV, with unresolved links flagged. info: structural project summary as JSON (stdout, or a file) — per-page element / conductor counts and unconnected terminals. check-elements: validate .elmt file(s) against the element schema. resave: load and rewrite the project XML (round-trip integrity). set-titleblock: stamp title-block fields onto every folio, then save. Keys: title, author, date (or date=today), plant, location, revision, version, filename; any other key becomes a custom field. E.g. –set-titleblock in.qet out.qet revision=B date=today

Here is the call graph for this function:
Here is the caller graph for this function: