[PCB Print][Added] Support for CURRENT_DATE text variable

This commit is contained in:
Salvador E. Tropea 2023-09-24 17:16:16 -03:00
parent b6815b6a94
commit c129c597ef
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Traceback dump when Blender output contains it
- KiKit
- Expand text variables and KiBot %X markers in text objects (see #497)
- PCB Print:
- Support for CURRENT_DATE text variable
- Populate:
- Basic support for regular list items (#480)
- Help for the error levels

View File

@ -29,6 +29,7 @@ Dependencies:
# version: '2.40'
# id: rsvg2
from copy import deepcopy
import datetime
import re
import os
import subprocess
@ -479,6 +480,7 @@ class PCB_PrintOptions(VariantOptions):
GS.load_pcb_title_block()
for num in range(9):
vars['COMMENT'+str(num+1)] = GS.pcb_com[num]
vars['CURRENT_DATE'] = datetime.datetime.now().strftime('%Y-%m-%d')
vars['COMPANY'] = GS.pcb_comp
vars['ISSUE_DATE'] = GS.pcb_date
vars['REVISION'] = GS.pcb_rev