From 2e7f3b81806b610a11f5b332cc3fa4c492f564fa Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 3 Dec 2021 18:05:21 -0300 Subject: [PATCH] Small adjusts to the PCB/SCH replacement docs --- README.md | 12 ++++++------ kibot/pre_any_replace.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 89f37af6..a59eb779 100644 --- a/README.md +++ b/README.md @@ -119,10 +119,10 @@ This section is used to specify tasks that will be executed before generating an - `ignore_unconnected`: [boolean=false] Option for `run_drc`. Ignores the unconnected nets. Useful if you didn't finish the routing. - `pcb_replace`: [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date. * Valid keys: - - `date_command`: [string=''] Command to get the date to use in the schematic. - git log -1 --format='%as' -- $KIBOT_PCB_NAME + - `date_command`: [string=''] Command to get the date to use in the PCB. + ```git log -1 --format='%as' -- $KIBOT_PCB_NAME``` Will return the date in YYYY-MM-DD format. - date -d @`git log -1 --format='%at' -- $KIBOT_PCB_NAME` +%Y-%m-%d_%H-%M-%S + ```date -d @`git log -1 --format='%at' -- $KIBOT_PCB_NAME` +%Y-%m-%d_%H-%M-%S``` Will return the date in YYYY-MM-DD_HH-MM-SS format. - `replace_tags`: [dict|list(dict)] Tag or tags to replace. * Valid keys: @@ -140,10 +140,10 @@ This section is used to specify tasks that will be executed before generating an The report file name is controlled by the global output pattern (%i=erc %x=txt). - `sch_replace`: [dict] Replaces tags in the schematic. I.e. to insert the git hash or last revision date. * Valid keys: - - `date_command`: [string=''] Command to get the date to use in the schematic. - git log -1 --format='%as' -- $KIBOT_SCH_NAME + - `date_command`: [string=''] Command to get the date to use in the SCH. + ```git log -1 --format='%as' -- $KIBOT_SCH_NAME``` Will return the date in YYYY-MM-DD format. - date -d @`git log -1 --format='%at' -- $KIBOT_SCH_NAME` +%Y-%m-%d_%H-%M-%S + ```date -d @`git log -1 --format='%at' -- $KIBOT_SCH_NAME` +%Y-%m-%d_%H-%M-%S``` Will return the date in YYYY-MM-DD_HH-MM-SS format. - `replace_tags`: [dict|list(dict)] Tag or tags to replace. * Valid keys: diff --git a/kibot/pre_any_replace.py b/kibot/pre_any_replace.py index 4ed44f73..6b2cc0d8 100644 --- a/kibot/pre_any_replace.py +++ b/kibot/pre_any_replace.py @@ -51,10 +51,10 @@ class Base_ReplaceOptions(Optionable): super().__init__() with document: self.date_command = '' - """ Command to get the date to use in the schematic. - git log -1 --format='%as' -- $KIBOT_PCB_NAME + """ Command to get the date to use in the PCB. + ```git log -1 --format='%as' -- $KIBOT_PCB_NAME``` Will return the date in YYYY-MM-DD format. - date -d @`git log -1 --format='%at' -- $KIBOT_PCB_NAME` +%Y-%m-%d_%H-%M-%S + ```date -d @`git log -1 --format='%at' -- $KIBOT_PCB_NAME` +%Y-%m-%d_%H-%M-%S``` Will return the date in YYYY-MM-DD_HH-MM-SS format """ self.replace_tags = TagReplaceBase """ [dict|list(dict)] Tag or tags to replace """