From 45c5d2c7ebe6f798ceb4245f995d716dc1501318 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 15 Nov 2023 13:39:54 -0300 Subject: [PATCH] [DOCs][Added] backticks to text replacement variables This is based on the #517 PR, but applied to the source code --- docs/source/configuration/outputs/download_datasheets.rst | 2 +- docs/source/configuration/outputs/dxf.rst | 4 ++-- docs/source/configuration/outputs/gerber.rst | 4 ++-- docs/source/configuration/outputs/hpgl.rst | 4 ++-- docs/source/configuration/outputs/panelize.rst | 2 +- docs/source/configuration/outputs/pdf.rst | 8 ++++---- docs/source/configuration/outputs/ps.rst | 4 ++-- docs/source/configuration/outputs/svg.rst | 4 ++-- docs/source/configuration/sup_globals.rst | 4 ++-- docs/source/configuration/sup_preflights.rst | 2 +- kibot/globals.py | 4 ++-- kibot/out_any_layer.py | 4 ++-- kibot/out_download_datasheets.py | 4 ++-- kibot/pre_set_text_variables.py | 2 +- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/source/configuration/outputs/download_datasheets.rst b/docs/source/configuration/outputs/download_datasheets.rst index 7615bea2..ba7ae1d6 100644 --- a/docs/source/configuration/outputs/download_datasheets.rst +++ b/docs/source/configuration/outputs/download_datasheets.rst @@ -31,7 +31,7 @@ Parameters: - ``link_repeated`` :index:`: ` [boolean=true] Instead of download things we already downloaded use symlinks. - ``output`` :index:`: ` [string='${VALUE}.pdf'] Name used for the downloaded datasheet. - ${FIELD} will be replaced by the FIELD content. + `${FIELD}` will be replaced by the FIELD content. - ``pre_transform`` :index:`: ` [string|list(string)='_none'] Name of the filter to transform fields before applying other filters. A short-cut to use for simple cases where a variant is an overkill. diff --git a/docs/source/configuration/outputs/dxf.rst b/docs/source/configuration/outputs/dxf.rst index a3050967..02dd1283 100644 --- a/docs/source/configuration/outputs/dxf.rst +++ b/docs/source/configuration/outputs/dxf.rst @@ -48,8 +48,8 @@ Parameters: - Valid keys: - - ``content`` :index:`: ` [string=''] Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER. + - ``content`` :index:`: ` [string=''] Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER. - ``output`` :index:`: ` [string='Custom_report.txt'] File name for the custom report. - ``dnf_filter`` :index:`: ` [string|list(string)='_none'] Name of the filter to mark components as not fitted. diff --git a/docs/source/configuration/outputs/gerber.rst b/docs/source/configuration/outputs/gerber.rst index 20eb1372..e200928e 100644 --- a/docs/source/configuration/outputs/gerber.rst +++ b/docs/source/configuration/outputs/gerber.rst @@ -53,8 +53,8 @@ Parameters: - Valid keys: - - ``content`` :index:`: ` [string=''] Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER. + - ``content`` :index:`: ` [string=''] Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER. - ``output`` :index:`: ` [string='Custom_report.txt'] File name for the custom report. - ``disable_aperture_macros`` :index:`: ` [boolean=false] Disable aperture macros (workaround for buggy CAM software) (KiCad 6). diff --git a/docs/source/configuration/outputs/hpgl.rst b/docs/source/configuration/outputs/hpgl.rst index f3149103..9397d9b5 100644 --- a/docs/source/configuration/outputs/hpgl.rst +++ b/docs/source/configuration/outputs/hpgl.rst @@ -47,8 +47,8 @@ Parameters: - Valid keys: - - ``content`` :index:`: ` [string=''] Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER. + - ``content`` :index:`: ` [string=''] Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER. - ``output`` :index:`: ` [string='Custom_report.txt'] File name for the custom report. - ``dnf_filter`` :index:`: ` [string|list(string)='_none'] Name of the filter to mark components as not fitted. diff --git a/docs/source/configuration/outputs/panelize.rst b/docs/source/configuration/outputs/panelize.rst index 6c164e11..91b27873 100644 --- a/docs/source/configuration/outputs/panelize.rst +++ b/docs/source/configuration/outputs/panelize.rst @@ -253,7 +253,7 @@ Parameters: - Valid keys: - - **type** :index:`: ` [string='auto'] [auto,rectangle,annotation] How we select the area of the PCB tu used for the panelization. + - **type** :index:`: ` [string='auto'] [auto,rectangle,annotation] How we select the area of the PCB used for the panelization. *auto* uses all the area reported by KiCad, *rectangle* a specified rectangle and *annotation* selects a contour marked by a kikit:Board footprint. - ``brx`` :index:`: ` [number|string] Bottom right X coordinate of the rectangle used. Used for *rectangle*. diff --git a/docs/source/configuration/outputs/pdf.rst b/docs/source/configuration/outputs/pdf.rst index 36263ccc..edee6293 100644 --- a/docs/source/configuration/outputs/pdf.rst +++ b/docs/source/configuration/outputs/pdf.rst @@ -50,8 +50,8 @@ Parameters: - Valid keys: - - ``content`` :index:`: ` [string=''] Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER. + - ``content`` :index:`: ` [string=''] Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER. - ``output`` :index:`: ` [string='Custom_report.txt'] File name for the custom report. - ``dnf_filter`` :index:`: ` [string|list(string)='_none'] Name of the filter to mark components as not fitted. @@ -99,8 +99,8 @@ Parameters: - Valid keys: - - ``content`` :index:`: ` [string=''] Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER. + - ``content`` :index:`: ` [string=''] Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER. - ``output`` :index:`: ` [string='Custom_report.txt'] File name for the custom report. - ``disable_run_by_default`` :index:`: ` [string|boolean] Use it to disable the `run_by_default` status of other output. diff --git a/docs/source/configuration/outputs/ps.rst b/docs/source/configuration/outputs/ps.rst index 677e3269..975525f6 100644 --- a/docs/source/configuration/outputs/ps.rst +++ b/docs/source/configuration/outputs/ps.rst @@ -50,8 +50,8 @@ Parameters: - Valid keys: - - ``content`` :index:`: ` [string=''] Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER. + - ``content`` :index:`: ` [string=''] Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER. - ``output`` :index:`: ` [string='Custom_report.txt'] File name for the custom report. - ``dnf_filter`` :index:`: ` [string|list(string)='_none'] Name of the filter to mark components as not fitted. diff --git a/docs/source/configuration/outputs/svg.rst b/docs/source/configuration/outputs/svg.rst index b9102283..3e8cfd41 100644 --- a/docs/source/configuration/outputs/svg.rst +++ b/docs/source/configuration/outputs/svg.rst @@ -50,8 +50,8 @@ Parameters: - Valid keys: - - ``content`` :index:`: ` [string=''] Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER. + - ``content`` :index:`: ` [string=''] Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER. - ``output`` :index:`: ` [string='Custom_report.txt'] File name for the custom report. - ``dnf_filter`` :index:`: ` [string|list(string)='_none'] Name of the filter to mark components as not fitted. diff --git a/docs/source/configuration/sup_globals.rst b/docs/source/configuration/sup_globals.rst index c0d5bb30..dca8cf57 100644 --- a/docs/source/configuration/sup_globals.rst +++ b/docs/source/configuration/sup_globals.rst @@ -58,7 +58,7 @@ - ``environment`` :index:`: ` [dict] Used to define environment variables used by KiCad. The values defined here are exported as environment variables and has more precedence than KiCad paths defined in the GUI. - You can make reference to any OS environment variable using ${VARIABLE}. + You can make reference to any OS environment variable using `${VARIABLE}`. The KIPRJMOD is also available for expansion. - Valid keys: @@ -193,6 +193,6 @@ - ``units`` :index:`: ` [string=''] [millimeters,inches,mils] Default units. Affects `position`, `bom` and `panelize` outputs. Also KiCad 6 dimensions. - ``use_dir_for_preflights`` :index:`: ` [boolean=true] Use the global `dir` as subdir for the preflights. - - ``use_os_env_for_expand`` :index:`: ` [boolean=true] In addition to KiCad text variables also use the OS environment variables when expanding ${VARIABLE}. + - ``use_os_env_for_expand`` :index:`: ` [boolean=true] In addition to KiCad text variables also use the OS environment variables when expanding `${VARIABLE}`. - ``variant`` :index:`: ` [string=''] Default variant to apply to all outputs. diff --git a/docs/source/configuration/sup_preflights.rst b/docs/source/configuration/sup_preflights.rst index d75c837f..434ae7dd 100644 --- a/docs/source/configuration/sup_preflights.rst +++ b/docs/source/configuration/sup_preflights.rst @@ -116,7 +116,7 @@ Supported preflights - **set_text_variables**: :index:`: ` [dict|list(dict)] Defines KiCad 6+ variables. - They are expanded using ${VARIABLE}, and stored in the project file. |br| + They are expanded using `${VARIABLE}`, and stored in the project file. |br| This preflight replaces `pcb_replace` and `sch_replace` when using KiCad 6. |br| The KiCad project file is modified. |br| diff --git a/kibot/globals.py b/kibot/globals.py index aec5a223..007427d6 100644 --- a/kibot/globals.py +++ b/kibot/globals.py @@ -282,7 +282,7 @@ class Globals(FiltersOptions): """ [dict] Used to define environment variables used by KiCad. The values defined here are exported as environment variables and has more precedence than KiCad paths defined in the GUI. - You can make reference to any OS environment variable using ${VARIABLE}. + You can make reference to any OS environment variable using `${VARIABLE}`. The KIPRJMOD is also available for expansion """ self.field_lcsc_part = '' """ The name of the schematic field that contains the part number for the LCSC/JLCPCB distributor. @@ -324,7 +324,7 @@ class Globals(FiltersOptions): Also note that the fonts are installed using a mechanism known to work on Debian, which is used by the KiBot docker images, on other OSs *your mileage may vary* """ self.use_os_env_for_expand = True - """ In addition to KiCad text variables also use the OS environment variables when expanding ${VARIABLE} """ + """ In addition to KiCad text variables also use the OS environment variables when expanding `${VARIABLE}` """ self.field_voltage = Optionable """ [string|list(string)] Name/s of the field/s used for the voltage raiting. Used for the value split filter. diff --git a/kibot/out_any_layer.py b/kibot/out_any_layer.py index 8094bb71..159b8726 100644 --- a/kibot/out_any_layer.py +++ b/kibot/out_any_layer.py @@ -36,8 +36,8 @@ class CustomReport(Optionable): self.output = 'Custom_report.txt' """ File name for the custom report """ self.content = '' - """ Content for the report. Use ${basename} for the project name without extension. - Use ${filename(LAYER)} for the file corresponding to LAYER """ + """ Content for the report. Use `${basename}` for the project name without extension. + Use `${filename(LAYER)}` for the file corresponding to LAYER """ class AnyLayerOptions(VariantOptions): diff --git a/kibot/out_download_datasheets.py b/kibot/out_download_datasheets.py index 09248ec7..0b34edea 100644 --- a/kibot/out_download_datasheets.py +++ b/kibot/out_download_datasheets.py @@ -30,7 +30,7 @@ class Download_Datasheets_Options(VariantOptions): """ *Name of the field containing the URL """ self.output = '${VALUE}.pdf' """ Name used for the downloaded datasheet. - ${FIELD} will be replaced by the FIELD content """ + `${FIELD}` will be replaced by the FIELD content """ self.dnf = False """ Include the DNF components """ self.repeated = False @@ -92,7 +92,7 @@ class Download_Datasheets_Options(VariantOptions): def out_name(self, c): """ Compute the name of the output file. - Replaces ${FIELD} and %X. """ + Replaces `${FIELD}` and %X. """ out = '' last = 0 pattern = self.output diff --git a/kibot/pre_set_text_variables.py b/kibot/pre_set_text_variables.py index e8382699..884963f4 100644 --- a/kibot/pre_set_text_variables.py +++ b/kibot/pre_set_text_variables.py @@ -77,7 +77,7 @@ class Set_Text_VariablesOptions(Optionable): @pre_class class Set_Text_Variables(BasePreFlight): # noqa: F821 """ [dict|list(dict)] Defines KiCad 6+ variables. - They are expanded using ${VARIABLE}, and stored in the project file. + 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. Warning: don't use `-s all` or this preflight will be skipped """