Added support for PcbDraw v0.6.0.
This commit is contained in:
parent
ee69de6e7d
commit
90c0e14b73
|
|
@ -88,9 +88,9 @@ def check_version(command, version):
|
|||
cmd = [command, '--version']
|
||||
logger.debug('Running: '+str(cmd))
|
||||
result = run(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
||||
z = re.match(command + r' (\d+\.\d+\.\d+)', result.stdout)
|
||||
z = re.match(command + r' (\d+\.\d+\.\d+)', result.stdout, re.IGNORECASE)
|
||||
if not z:
|
||||
z = re.search(r'Version: (\d+\.\d+\.\d+)', result.stdout)
|
||||
z = re.search(r'Version: (\d+\.\d+\.\d+)', result.stdout, re.IGNORECASE)
|
||||
if not z:
|
||||
logger.error('Unable to determine ' + command + ' version:\n' +
|
||||
result.stdout)
|
||||
|
|
|
|||
|
|
@ -42,5 +42,6 @@ CMD_IBOM = 'generate_interactive_bom.py'
|
|||
URL_IBOM = 'https://github.com/INTI-CMNB/InteractiveHtmlBom'
|
||||
KICAD2STEP = 'kicad2step'
|
||||
PCBDRAW = 'pcbdraw'
|
||||
URL_PCBDRAW = 'https://github.com/INTI-CMNB/pcbdraw'
|
||||
EXAMPLE_CFG = 'example.kibot.yaml'
|
||||
AUTO_SCALE = 0
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import re
|
|||
from shutil import which
|
||||
from tempfile import (NamedTemporaryFile)
|
||||
from subprocess import (check_output, STDOUT, CalledProcessError)
|
||||
from .misc import (PCBDRAW, PCBDRAW_ERR)
|
||||
from .misc import PCBDRAW, PCBDRAW_ERR, URL_PCBDRAW
|
||||
from .kiplot import check_script
|
||||
from .error import KiPlotConfigurationError
|
||||
from .gs import (GS)
|
||||
from .optionable import (BaseOptions, Optionable)
|
||||
|
|
@ -203,6 +204,7 @@ class PcbDrawOptions(BaseOptions):
|
|||
return f.name
|
||||
|
||||
def run(self, output_dir, board):
|
||||
check_script(PCBDRAW, URL_PCBDRAW, '0.6.0')
|
||||
# Output file name
|
||||
output = self.expand_filename(output_dir, self.output, 'bottom' if self.bottom else 'top', self.format)
|
||||
# Base command with overwrite
|
||||
|
|
@ -231,8 +233,8 @@ class PcbDrawOptions(BaseOptions):
|
|||
cmd.extend(['-f', self.show_components])
|
||||
if self.vcuts:
|
||||
cmd.append('-v')
|
||||
if self.warnings == 'all':
|
||||
cmd.append('--warn-back')
|
||||
if self.warnings == 'visible':
|
||||
cmd.append('--no-warn-back')
|
||||
elif self.warnings == 'none':
|
||||
cmd.append('--silent')
|
||||
if self.dpi:
|
||||
|
|
|
|||
Loading…
Reference in New Issue