diff --git a/README.md b/README.md index 9cdb55e2..90d8bce3 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,14 @@ This section is used to specify tasks that will be executed before generating an They are expanded using ${VARIABLE}, and stored in the project file. This preflight replaces `pcb_replace` and `sch_replace` when using KiCad 6. The KiCad project file is modified. + * Valid keys: + - `after`: [string=''] Text to add after the output of `command`. + - `before`: [string=''] Text to add before the output of `command`. + - `command`: [string=''] Command to execute to get the text, will be used only if `text` is empty. + - `expand_kibot_patterns`: [boolean=true] Expand %X patterns. The context is `schematic`. + - `name`: [string=''] Name of the variable. The `version` variable will be expanded using `${version}`. + - `text`: [string=''] Text to insert instead of the variable. + - *variable*: Alias for name. - `update_qr`: [boolean=false] Update the QR codes. Complements the `qr_lib` output. The KiCad 6 files and the KiCad 5 PCB needs manual update, generating a new library isn't enough. diff --git a/kibot/pre_set_text_variables.py b/kibot/pre_set_text_variables.py index fd70cede..4cc833d6 100644 --- a/kibot/pre_set_text_variables.py +++ b/kibot/pre_set_text_variables.py @@ -73,6 +73,10 @@ class Set_Text_Variables(BasePreFlight): # noqa: F821 f.config(self) super().__init__(name, f.variables) + @classmethod + def get_doc(cls): + return cls.__doc__, KiCadVariable + @classmethod def get_example(cls): """ Returns a YAML value for the example config """