mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-12 15:03:15 +02:00
CLI: add --set-titleblock to stamp title-block fields headlessly
The first write-to-project CLI command, aimed at CI / revision workflows: stamp title-block metadata onto every folio (and the project default), then save. Each argument is key=value: qelectrotech --set-titleblock in.qet out.qet revision=B date=today Standard keys map to the documented title-block fields (title, author, date, plant, location, revision, version, filename); date=today uses the current date and an explicit date forces UseDateValue mode; any other key is stored as a custom title-block field. Assignments are parsed up front so a malformed one fails before writing. Addresses the 'saving' side of the CLI-for-scripts request (#162).
This commit is contained in:
@@ -53,6 +53,7 @@ namespace CLIExport {
|
||||
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>.
|
||||
@@ -66,6 +67,10 @@ namespace CLIExport {
|
||||
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
|
||||
*/
|
||||
int run(const QStringList &args);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user