diff --git a/README.md b/README.md index 0c93207d..4335347a 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,9 @@ This section is used to specify tasks that will be executed before generating an ```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. + Will return the date in YYYY-MM-DD_HH-MM-SS format.\ + Important: on KiCad 6 the title block data is optional. + This command will work only if you have a date in the PCB/Schematic. - `replace_tags`: [dict|list(dict)] Tag or tags to replace. * Valid keys: - `after`: [string=''] Text to add after the output of `command`. @@ -147,7 +149,9 @@ This section is used to specify tasks that will be executed before generating an ```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. + Will return the date in YYYY-MM-DD_HH-MM-SS format.\ + Important: on KiCad 6 the title block data is optional. + This command will work only if you have a date in the SCH/Schematic. - `replace_tags`: [dict|list(dict)] Tag or tags to replace. * Valid keys: - `after`: [string=''] Text to add after the output of `command`. diff --git a/kibot/pre_any_replace.py b/kibot/pre_any_replace.py index eb61b9d3..dbbfaed2 100644 --- a/kibot/pre_any_replace.py +++ b/kibot/pre_any_replace.py @@ -55,7 +55,9 @@ class Base_ReplaceOptions(Optionable): ```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 """ + Will return the date in YYYY-MM-DD_HH-MM-SS format.\\ + Important: on KiCad 6 the title block data is optional. + This command will work only if you have a date in the PCB/Schematic """ self.replace_tags = TagReplaceBase """ [dict|list(dict)] Tag or tags to replace """