XmlScriptInterpreter - HendriXML/KiCad-BOM-reporter GitHub Wiki
This is a Windows application developed by me in Delphi. The coding is with XML elements, structured similar like the Object Pascal language. Code is “compiled” in a single pass with XML SAX in an efficient way. After this execution is fast as well.
Because the base is XML the possibility to create extra “coding constructs” are endles. These are documented in XML schema’s and are used as a great way to make normally complex code more user friendly.
Scripts can define report targets, which are then mapped to RichText controls. In this way it is easy to create reports with (some) text formatting.
Allows you to select an load a script file. Another way to to do this is to drag ‘n drop a script file on the form. Loading isn’t possible if a script is already running.
Loads or reloads a script file.
Loads or reloads a script file, and execute it in one action.
Executes a script. Or when the script is suspended, resumes it.
Sets a flag which can be checked in the script. Lengthly operations can be requested to be canceled this way.
When checked expressions will (partly) be resolved at loading time.
The state of this checkbox can be read with the IsSimulation function. When checked the script might not make real changes.
The state of this checkbox can be read with the IsVerbose function. When checked the script might output more information.
When checked the application will end, when the script is done.
When checked Windows will shutdown, when the script finishes. This is done without asking the user to save unsaved document etc.
The state of this checkbox can be read with the PauseRequest function. When checked the script might pause at certain points in the script.
The state of this checkbox can be read with the IsDebugging function. When checked the script might change it’s behavior for debugging purposes.
When checked the report(s) are saved, without overwrite warnings to the given directory under the reports tab.
A script may define many report targets, which will show as separate tabs within this tab control.
A way to pass a list of strings to the script. These are accessibele via an InputStrings function.
This shows a copy of the script config section, or the loaded ini file from the command line option. A new load always reloads the config section from the script file. Inif-file settings can be set here before the script is executed. These are accessible via a ConfigInifile function. Changed settings won’t be saved in the script file. Permanent changes must be done in the scriptfile itself.
When this tab is activated, the user has the possibility to select (sub)tasks which will be executed. Tasks (or category like tasks) may have required sub tasks, which will be selected also.
XmlScriptInterpreter.exe <script-file> <options>
Options:
/Var <variable name> <variable value>
/ReportPath <directory name>
/AltConfig <ini-file>
/Execute
/CloseOnTerminate
/ShutDownOnTerminate
/StackInfo
/ActivateReportTarget <report target>
Wraps every executable unit with a context reporting one, so a stacktrace can be shown when a exception occurs.
BomFilename <filename>
Unattended <tasks>
tasks: Bom, BomEEVBlog, BomDokuWiki, BomDesignators, BomOrderPicking, Stock, StorageLocations, PartKeeprProjects
HideSpecs <specs>
specs: ESerieOfValue, ResistorMaxAmpVolt, ZenerDiodeMaxAmp, Footprint
SheetInfo <details>
details: None|Root|All