From 308725e24f7008e854621a47a0f45b0af2b272e0 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 3 Dec 2021 18:11:06 -0300 Subject: [PATCH] More style adjusts to the replacement docs --- README.md | 16 ++++++++-------- kibot/pre_any_replace.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a59eb779..778d58f2 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 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_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```\ 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 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_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```\ 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 6b2cc0d8..eb61b9d3 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 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``` + """ 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```\\ Will return the date in YYYY-MM-DD_HH-MM-SS format """ self.replace_tags = TagReplaceBase """ [dict|list(dict)] Tag or tags to replace """