mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-12 15:03:15 +02:00
CLI export: add wiring list and wire-number list (CSV)
Extends the headless command-line export with two CSV outputs: qelectrotech --export-cables <project.qet> <output.csv> wiring list qelectrotech --export-wires <project.qet> <output.csv> wire numbers - --export-cables reuses WiringListExport (one row per conductor). - --export-wires reuses ConductorNumExport::wiresNum() (distinct wire numbers). WiringListExport::toCsv() mixed CSV generation with the file dialog and writing. Extracted the generation into a new const method toCsvString() that returns the CSV; toCsv() now calls it and writes the result. This makes the wiring list usable headlessly with no behavioural change to the GUI export. Addresses part of the CLI export requests (#162, #309): @pkess specifically asked to "export all connections as a list".
This commit is contained in:
@@ -42,12 +42,16 @@ namespace CLIExport {
|
||||
@return process exit code (0 on success).
|
||||
|
||||
Usage:
|
||||
qelectrotech --export-pdf <project.qet> <output.pdf>
|
||||
qelectrotech --export-png <project.qet> <output_dir>
|
||||
qelectrotech --export-svg <project.qet> <output_dir>
|
||||
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 <output_dir>/<NN>_<title>.<ext>.
|
||||
cables: wiring list (one row per conductor) as CSV.
|
||||
wires: list of distinct wire numbers as CSV.
|
||||
*/
|
||||
int run(const QStringList &args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user