[KiCanvas] Implemented the Quick Start hook
This commit is contained in:
parent
a1c0dd6c2b
commit
144a83d73d
|
|
@ -95,7 +95,7 @@ class KiCanvasOptions(VariantOptions):
|
||||||
self.restore_title(sch=True)
|
self.restore_title(sch=True)
|
||||||
|
|
||||||
def run(self, out_dir):
|
def run(self, out_dir):
|
||||||
# We declare _none_related=True because we don't know if the PCB/SCH are needed until the output is configured.
|
# We declare _any_related=True because we don't know if the PCB/SCH are needed until the output is configured.
|
||||||
# Now that we know it we can load the PCB and/or SCH.
|
# Now that we know it we can load the PCB and/or SCH.
|
||||||
for s in self.source:
|
for s in self.source:
|
||||||
if s == 'pcb':
|
if s == 'pcb':
|
||||||
|
|
@ -194,8 +194,13 @@ class KiCanvas(BaseOutput): # noqa: F821
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_conf_examples(name, layers):
|
def get_conf_examples(name, layers):
|
||||||
# TODO: implement
|
outs = BaseOutput.simple_conf_examples(name, 'Web page to browse the schematic and/or PCB', 'Browse') # noqa: F821
|
||||||
outs = []
|
sources = []
|
||||||
|
if GS.sch_file:
|
||||||
|
sources.append('schematic')
|
||||||
|
if GS.pcb_file:
|
||||||
|
sources.append('pcb')
|
||||||
|
outs[0]['options'] = {'source': sources}
|
||||||
return outs
|
return outs
|
||||||
|
|
||||||
def get_navigate_targets(self, out_dir):
|
def get_navigate_targets(self, out_dir):
|
||||||
|
|
|
||||||
|
|
@ -1389,7 +1389,7 @@ def test_quick_start_1(test_dir):
|
||||||
ctx.run(extra=['-c', dest_conf_f, '-b', dest_file, '-l'], no_out_dir=True, no_yaml_file=True, no_board_file=True)
|
ctx.run(extra=['-c', dest_conf_f, '-b', dest_file, '-l'], no_out_dir=True, no_yaml_file=True, no_board_file=True)
|
||||||
OUTS = ('boardview', 'dxf', 'excellon', 'gencad', 'gerb_drill', 'gerber', 'compress', 'hpgl', 'ibom',
|
OUTS = ('boardview', 'dxf', 'excellon', 'gencad', 'gerb_drill', 'gerber', 'compress', 'hpgl', 'ibom',
|
||||||
'navigate_results', 'netlist', 'pcb_print', 'pcbdraw', 'pdf', 'position', 'ps', 'render_3d',
|
'navigate_results', 'netlist', 'pcb_print', 'pcbdraw', 'pdf', 'position', 'ps', 'render_3d',
|
||||||
'report', 'step', 'svg', 'kiri', # 'kicanvas',
|
'report', 'step', 'svg', 'kiri', 'kicanvas',
|
||||||
'bom', 'download_datasheets', 'pdf_sch_print', 'svg_sch_print')
|
'bom', 'download_datasheets', 'pdf_sch_print', 'svg_sch_print')
|
||||||
for o in OUTS:
|
for o in OUTS:
|
||||||
ctx.search_out(r'\['+o+r'\]')
|
ctx.search_out(r'\['+o+r'\]')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue