Adjusted the generated YAML example to be more coherent
- Fixed list on list indentation - No extra EOL at EOF - No trailing spaces on some examples
This commit is contained in:
parent
680541154e
commit
5fb64472db
|
|
@ -63,7 +63,6 @@ outputs:
|
||||||
options:
|
options:
|
||||||
# [string='%f-%i%I%v.%x'] Filename for the output (%i=boardview, %x=brd). Affected by global options
|
# [string='%f-%i%I%v.%x'] Filename for the output (%i=boardview, %x=brd). Affected by global options
|
||||||
output: '%f-%i%I%v.%x'
|
output: '%f-%i%I%v.%x'
|
||||||
|
|
||||||
# BoM (Bill of Materials):
|
# BoM (Bill of Materials):
|
||||||
# This output can generate XYRS files (pick and place files).
|
# This output can generate XYRS files (pick and place files).
|
||||||
# Is compatible with KiBoM, but doesn't need to update the XML netlist because the components
|
# Is compatible with KiBoM, but doesn't need to update the XML netlist because the components
|
||||||
|
|
@ -100,20 +99,20 @@ outputs:
|
||||||
field: 'Row'
|
field: 'Row'
|
||||||
# [list(dict)|list(string)|string=''] List of fields to join to this column
|
# [list(dict)|list(string)|string=''] List of fields to join to this column
|
||||||
join:
|
join:
|
||||||
# [string=''] Name of the field
|
# [string=''] Name of the field
|
||||||
- field: 'Voltage'
|
- field: 'Voltage'
|
||||||
# [string=''] Text to use instead of a field. This option is incompatible with the `field` option.
|
# [string=''] Text to use instead of a field. This option is incompatible with the `field` option.
|
||||||
# Any space to separate it should be added in the text.
|
# Any space to separate it should be added in the text.
|
||||||
# Use \n for newline and \t for tab
|
# Use \n for newline and \t for tab
|
||||||
text: ''
|
text: ''
|
||||||
# [string=''] Text to add after the field content. Will be added only if the field isn't empty.
|
# [string=''] Text to add after the field content. Will be added only if the field isn't empty.
|
||||||
# Any space to separate it should be added in the text.
|
# Any space to separate it should be added in the text.
|
||||||
# Use \n for newline and \t for tab
|
# Use \n for newline and \t for tab
|
||||||
text_after: ''
|
text_after: ''
|
||||||
# [string=''] Text to add before the field content. Will be added only if the field isn't empty.
|
# [string=''] Text to add before the field content. Will be added only if the field isn't empty.
|
||||||
# Any space to separate it should be added in the text.
|
# Any space to separate it should be added in the text.
|
||||||
# Use \n for newline and \t for tab
|
# Use \n for newline and \t for tab
|
||||||
text_before: ''
|
text_before: ''
|
||||||
# [number=0] Used to group columns. The XLSX output uses it to collapse columns
|
# [number=0] Used to group columns. The XLSX output uses it to collapse columns
|
||||||
level: 0
|
level: 0
|
||||||
# [string=''] Name to display in the header. The field is used when empty
|
# [string=''] Name to display in the header. The field is used when empty
|
||||||
|
|
@ -138,20 +137,20 @@ outputs:
|
||||||
field: 'Row'
|
field: 'Row'
|
||||||
# [list(dict)|list(string)|string=''] List of fields to join to this column
|
# [list(dict)|list(string)|string=''] List of fields to join to this column
|
||||||
join:
|
join:
|
||||||
# [string=''] Name of the field
|
# [string=''] Name of the field
|
||||||
- field: 'Voltage'
|
- field: 'Voltage'
|
||||||
# [string=''] Text to use instead of a field. This option is incompatible with the `field` option.
|
# [string=''] Text to use instead of a field. This option is incompatible with the `field` option.
|
||||||
# Any space to separate it should be added in the text.
|
# Any space to separate it should be added in the text.
|
||||||
# Use \n for newline and \t for tab
|
# Use \n for newline and \t for tab
|
||||||
text: ''
|
text: ''
|
||||||
# [string=''] Text to add after the field content. Will be added only if the field isn't empty.
|
# [string=''] Text to add after the field content. Will be added only if the field isn't empty.
|
||||||
# Any space to separate it should be added in the text.
|
# Any space to separate it should be added in the text.
|
||||||
# Use \n for newline and \t for tab
|
# Use \n for newline and \t for tab
|
||||||
text_after: ''
|
text_after: ''
|
||||||
# [string=''] Text to add before the field content. Will be added only if the field isn't empty.
|
# [string=''] Text to add before the field content. Will be added only if the field isn't empty.
|
||||||
# Any space to separate it should be added in the text.
|
# Any space to separate it should be added in the text.
|
||||||
# Use \n for newline and \t for tab
|
# Use \n for newline and \t for tab
|
||||||
text_before: ''
|
text_before: ''
|
||||||
# [number=0] Used to group columns. The XLSX output uses it to collapse columns
|
# [number=0] Used to group columns. The XLSX output uses it to collapse columns
|
||||||
level: 0
|
level: 0
|
||||||
# [string=''] Name to display in the header. The field is used when empty
|
# [string=''] Name to display in the header. The field is used when empty
|
||||||
|
|
@ -293,7 +292,6 @@ outputs:
|
||||||
style: 'modern-blue'
|
style: 'modern-blue'
|
||||||
# [string='KiBot Bill of Materials'] BoM title
|
# [string='KiBot Bill of Materials'] BoM title
|
||||||
title: 'KiBot Bill of Materials'
|
title: 'KiBot Bill of Materials'
|
||||||
|
|
||||||
# Archiver (files compressor):
|
# Archiver (files compressor):
|
||||||
# This is used to generate groups of files in compressed file format.
|
# This is used to generate groups of files in compressed file format.
|
||||||
- name: 'compress_example'
|
- name: 'compress_example'
|
||||||
|
|
@ -322,7 +320,6 @@ outputs:
|
||||||
format: 'ZIP'
|
format: 'ZIP'
|
||||||
# [string='%f-%i%I%v.%x'] Name for the generated archive (%i=name of the output %x=according to format). Affected by global options
|
# [string='%f-%i%I%v.%x'] Name for the generated archive (%i=name of the output %x=according to format). Affected by global options
|
||||||
output: '%f-%i%I%v.%x'
|
output: '%f-%i%I%v.%x'
|
||||||
|
|
||||||
# Datasheets downloader:
|
# Datasheets downloader:
|
||||||
- name: 'download_datasheets_example'
|
- name: 'download_datasheets_example'
|
||||||
comment: 'Downloads the datasheets for the project'
|
comment: 'Downloads the datasheets for the project'
|
||||||
|
|
@ -346,7 +343,6 @@ outputs:
|
||||||
repeated: false
|
repeated: false
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
|
|
||||||
# DXF (Drawing Exchange Format):
|
# DXF (Drawing Exchange Format):
|
||||||
# This output is what you get from the File/Plot menu in pcbnew.
|
# This output is what you get from the File/Plot menu in pcbnew.
|
||||||
- name: 'dxf_example'
|
- name: 'dxf_example'
|
||||||
|
|
@ -401,7 +397,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
layers: all
|
layers: all
|
||||||
|
|
||||||
# Excellon drill format:
|
# Excellon drill format:
|
||||||
# You can create a map file for documentation purposes.
|
# You can create a map file for documentation purposes.
|
||||||
# This output is what you get from the 'File/Fabrication output/Drill Files' menu in pcbnew.
|
# This output is what you get from the 'File/Fabrication output/Drill Files' menu in pcbnew.
|
||||||
|
|
@ -446,7 +441,6 @@ outputs:
|
||||||
use_aux_axis_as_origin: false
|
use_aux_axis_as_origin: false
|
||||||
# [string='DECIMAL_FORMAT'] [DECIMAL_FORMAT,SUPPRESS_LEADING,SUPPRESS_TRAILING,KEEP_ZEROS] How to handle the zeros
|
# [string='DECIMAL_FORMAT'] [DECIMAL_FORMAT,SUPPRESS_LEADING,SUPPRESS_TRAILING,KEEP_ZEROS] How to handle the zeros
|
||||||
zeros_format: 'DECIMAL_FORMAT'
|
zeros_format: 'DECIMAL_FORMAT'
|
||||||
|
|
||||||
# Gerber drill format:
|
# Gerber drill format:
|
||||||
# You can create a map file for documentation purposes.
|
# You can create a map file for documentation purposes.
|
||||||
# This output is what you get from the 'File/Fabrication output/Drill Files' menu in pcbnew.
|
# This output is what you get from the 'File/Fabrication output/Drill Files' menu in pcbnew.
|
||||||
|
|
@ -475,7 +469,6 @@ outputs:
|
||||||
filename: ''
|
filename: ''
|
||||||
# [boolean=false] Use the auxiliary axis as origin for coordinates
|
# [boolean=false] Use the auxiliary axis as origin for coordinates
|
||||||
use_aux_axis_as_origin: false
|
use_aux_axis_as_origin: false
|
||||||
|
|
||||||
# Gerber format:
|
# Gerber format:
|
||||||
# This output is what you get from the File/Plot menu in pcbnew.
|
# This output is what you get from the File/Plot menu in pcbnew.
|
||||||
- name: 'gerber_example'
|
- name: 'gerber_example'
|
||||||
|
|
@ -541,7 +534,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
layers: all
|
layers: all
|
||||||
|
|
||||||
# HPGL (Hewlett & Packard Graphics Language):
|
# HPGL (Hewlett & Packard Graphics Language):
|
||||||
# This output is what you get from the File/Plot menu in pcbnew.
|
# This output is what you get from the File/Plot menu in pcbnew.
|
||||||
- name: 'hpgl_example'
|
- name: 'hpgl_example'
|
||||||
|
|
@ -600,7 +592,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
layers: all
|
layers: all
|
||||||
|
|
||||||
# IBoM (Interactive HTML BoM):
|
# IBoM (Interactive HTML BoM):
|
||||||
# For more information: https://github.com/INTI-CMNB/InteractiveHtmlBom
|
# For more information: https://github.com/INTI-CMNB/InteractiveHtmlBom
|
||||||
# This output is what you get from the InteractiveHtmlBom plug-in (pcbnew).
|
# This output is what you get from the InteractiveHtmlBom plug-in (pcbnew).
|
||||||
|
|
@ -694,7 +685,6 @@ outputs:
|
||||||
# [string=''] List of board variants to include in the BOM.
|
# [string=''] List of board variants to include in the BOM.
|
||||||
# IBoM option, avoid using in conjunction with KiBot variants/filters
|
# IBoM option, avoid using in conjunction with KiBot variants/filters
|
||||||
variants_whitelist: ''
|
variants_whitelist: ''
|
||||||
|
|
||||||
# KiBoM (KiCad Bill of Materials):
|
# KiBoM (KiCad Bill of Materials):
|
||||||
# For more information: https://github.com/INTI-CMNB/KiBoM
|
# For more information: https://github.com/INTI-CMNB/KiBoM
|
||||||
# Note that this output is provided as a compatibility tool.
|
# Note that this output is provided as a compatibility tool.
|
||||||
|
|
@ -811,7 +801,6 @@ outputs:
|
||||||
# variants with the ';' (semicolon) character.
|
# variants with the ';' (semicolon) character.
|
||||||
# This isn't related to the KiBot concept of variants
|
# This isn't related to the KiBot concept of variants
|
||||||
variant: ''
|
variant: ''
|
||||||
|
|
||||||
# KiCost (KiCad Cost calculator):
|
# KiCost (KiCad Cost calculator):
|
||||||
# For more information: https://github.com/INTI-CMNB/KiCost
|
# For more information: https://github.com/INTI-CMNB/KiCost
|
||||||
# This output is what you get from the KiCost plug-in (eeschema).
|
# This output is what you get from the KiCost plug-in (eeschema).
|
||||||
|
|
@ -870,7 +859,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply.
|
# [string=''] Board variant to apply.
|
||||||
# Don't use the `kicost_variant` when using internal variants/filters
|
# Don't use the `kicost_variant` when using internal variants/filters
|
||||||
variant: ''
|
variant: ''
|
||||||
|
|
||||||
# PcbDraw - Beautiful 2D PCB render:
|
# PcbDraw - Beautiful 2D PCB render:
|
||||||
# Uses configurable colors.
|
# Uses configurable colors.
|
||||||
# Can also render the components if the 2D models are available
|
# Can also render the components if the 2D models are available
|
||||||
|
|
@ -933,7 +921,6 @@ outputs:
|
||||||
vcuts: false
|
vcuts: false
|
||||||
# [string='visible'] [visible,all,none] Using visible only the warnings about components in the visible side are generated
|
# [string='visible'] [visible,all,none] Using visible only the warnings about components in the visible side are generated
|
||||||
warnings: 'visible'
|
warnings: 'visible'
|
||||||
|
|
||||||
# PDF (Portable Document Format):
|
# PDF (Portable Document Format):
|
||||||
# Note that this output isn't the best for documating your project.
|
# Note that this output isn't the best for documating your project.
|
||||||
# This output is what you get from the File/Plot menu in pcbnew.
|
# This output is what you get from the File/Plot menu in pcbnew.
|
||||||
|
|
@ -987,7 +974,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
layers: all
|
layers: all
|
||||||
|
|
||||||
# PDF PCB Print (Portable Document Format):
|
# PDF PCB Print (Portable Document Format):
|
||||||
# This is the main format to document your PCB.
|
# This is the main format to document your PCB.
|
||||||
# This output is what you get from the 'File/Print' menu in pcbnew.
|
# This output is what you get from the 'File/Print' menu in pcbnew.
|
||||||
|
|
@ -1026,7 +1012,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
layers: all
|
layers: all
|
||||||
|
|
||||||
# PDF Schematic Print (Portable Document Format):
|
# PDF Schematic Print (Portable Document Format):
|
||||||
# This is the main format to document your schematic.
|
# This is the main format to document your schematic.
|
||||||
# This output is what you get from the 'File/Print' menu in eeschema.
|
# This output is what you get from the 'File/Print' menu in eeschema.
|
||||||
|
|
@ -1047,7 +1032,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply.
|
# [string=''] Board variant to apply.
|
||||||
# Not fitted components are crossed
|
# Not fitted components are crossed
|
||||||
variant: ''
|
variant: ''
|
||||||
|
|
||||||
# Pick & place:
|
# Pick & place:
|
||||||
# This output is what you get from the 'File/Fabrication output/Footprint poistion (.pos) file' menu in pcbnew.
|
# This output is what you get from the 'File/Fabrication output/Footprint poistion (.pos) file' menu in pcbnew.
|
||||||
- name: 'position_example'
|
- name: 'position_example'
|
||||||
|
|
@ -1082,7 +1066,6 @@ outputs:
|
||||||
use_aux_axis_as_origin: true
|
use_aux_axis_as_origin: true
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
|
|
||||||
# PS (Postscript):
|
# PS (Postscript):
|
||||||
# This output is what you get from the File/Plot menu in pcbnew.
|
# This output is what you get from the File/Plot menu in pcbnew.
|
||||||
- name: 'ps_example'
|
- name: 'ps_example'
|
||||||
|
|
@ -1148,7 +1131,6 @@ outputs:
|
||||||
# Only used to plot pads and tracks
|
# Only used to plot pads and tracks
|
||||||
width_adjust: 0
|
width_adjust: 0
|
||||||
layers: all
|
layers: all
|
||||||
|
|
||||||
# QR_Lib:
|
# QR_Lib:
|
||||||
# This output creates a library containing a symbol and footprint for a QR code.
|
# This output creates a library containing a symbol and footprint for a QR code.
|
||||||
# To refresh the generated symbols and footprints use the `update_qr` preflight.
|
# To refresh the generated symbols and footprints use the `update_qr` preflight.
|
||||||
|
|
@ -1187,7 +1169,6 @@ outputs:
|
||||||
reference: 'QR'
|
reference: 'QR'
|
||||||
# [boolean=true] Generate the libs relative to the schematic/PCB dir
|
# [boolean=true] Generate the libs relative to the schematic/PCB dir
|
||||||
use_sch_dir: true
|
use_sch_dir: true
|
||||||
|
|
||||||
# 3D render of the PCB:
|
# 3D render of the PCB:
|
||||||
- name: 'render_3d_example'
|
- name: 'render_3d_example'
|
||||||
comment: "Exports the image generated by KiCad's 3D viewer."
|
comment: "Exports the image generated by KiCad's 3D viewer."
|
||||||
|
|
@ -1249,7 +1230,6 @@ outputs:
|
||||||
# [number=0] Zoom steps. Use positive to enlarge, get closer, and negative to reduce.
|
# [number=0] Zoom steps. Use positive to enlarge, get closer, and negative to reduce.
|
||||||
# Same result as using the mouse wheel in the 3D viewer
|
# Same result as using the mouse wheel in the 3D viewer
|
||||||
zoom: 0
|
zoom: 0
|
||||||
|
|
||||||
# Design report:
|
# Design report:
|
||||||
# Mainly oriented to be sent to the manufacturer or check PCB details.
|
# Mainly oriented to be sent to the manufacturer or check PCB details.
|
||||||
- name: 'report_example'
|
- name: 'report_example'
|
||||||
|
|
@ -1261,7 +1241,6 @@ outputs:
|
||||||
output: '%f-%i%I%v.%x'
|
output: '%f-%i%I%v.%x'
|
||||||
# [string='full'] Name for one of the internal templates (full, simple) or a custom template file
|
# [string='full'] Name for one of the internal templates (full, simple) or a custom template file
|
||||||
template: 'full'
|
template: 'full'
|
||||||
|
|
||||||
# Schematic with variant generator:
|
# Schematic with variant generator:
|
||||||
# This copy isn't intended for development.
|
# This copy isn't intended for development.
|
||||||
# Is just a tweaked version of the original where you can look at the results.
|
# Is just a tweaked version of the original where you can look at the results.
|
||||||
|
|
@ -1275,7 +1254,6 @@ outputs:
|
||||||
dnf_filter: '_none'
|
dnf_filter: '_none'
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
|
|
||||||
# STEP (ISO 10303-21 Clear Text Encoding of the Exchange Structure):
|
# STEP (ISO 10303-21 Clear Text Encoding of the Exchange Structure):
|
||||||
# This is the most common 3D format for exchange purposes.
|
# This is the most common 3D format for exchange purposes.
|
||||||
# This output is what you get from the 'File/Export/STEP' menu in pcbnew.
|
# This output is what you get from the 'File/Export/STEP' menu in pcbnew.
|
||||||
|
|
@ -1307,7 +1285,6 @@ outputs:
|
||||||
subst_models: true
|
subst_models: true
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
|
|
||||||
# SVG (Scalable Vector Graphics):
|
# SVG (Scalable Vector Graphics):
|
||||||
# Unlike bitmaps SVG drawings can be scaled without losing resolution.
|
# Unlike bitmaps SVG drawings can be scaled without losing resolution.
|
||||||
# This output is what you get from the File/Plot menu in pcbnew.
|
# This output is what you get from the File/Plot menu in pcbnew.
|
||||||
|
|
@ -1361,7 +1338,6 @@ outputs:
|
||||||
# [string=''] Board variant to apply
|
# [string=''] Board variant to apply
|
||||||
variant: ''
|
variant: ''
|
||||||
layers: all
|
layers: all
|
||||||
|
|
||||||
# SVG Schematic Print:
|
# SVG Schematic Print:
|
||||||
# This is a format to document your schematic.
|
# This is a format to document your schematic.
|
||||||
- name: 'svg_sch_print_example'
|
- name: 'svg_sch_print_example'
|
||||||
|
|
|
||||||
|
|
@ -611,7 +611,8 @@ def print_example_options(f, cls, name, indent, po, is_list=False):
|
||||||
f.write(ind_str+'{}: {}\n'.format(k, val.get_default()))
|
f.write(ind_str+'{}: {}\n'.format(k, val.get_default()))
|
||||||
else:
|
else:
|
||||||
f.write(ind_str+'{}:\n'.format(k))
|
f.write(ind_str+'{}:\n'.format(k))
|
||||||
print_example_options(f, val, '', indent+2, None, help and 'list(dict' in help_lines[0])
|
extra_indent = 2 if not is_list else 4
|
||||||
|
print_example_options(f, val, '', indent+extra_indent, None, help and 'list(dict' in help_lines[0])
|
||||||
else:
|
else:
|
||||||
if is_list and first:
|
if is_list and first:
|
||||||
k = '- '+k
|
k = '- '+k
|
||||||
|
|
@ -646,7 +647,10 @@ def create_example(pcb_file, out_dir, copy_options, copy_expand):
|
||||||
lines = trim(o.__doc__.rstrip()+'.')
|
lines = trim(o.__doc__.rstrip()+'.')
|
||||||
for ln in lines:
|
for ln in lines:
|
||||||
f.write(' # '+ln.rstrip()+'\n')
|
f.write(' # '+ln.rstrip()+'\n')
|
||||||
f.write(' {}: {}\n'.format(n, o.get_example()))
|
example = o.get_example()
|
||||||
|
if not example.startswith("\n"):
|
||||||
|
example = ' '+example
|
||||||
|
f.write(' {}:{}\n'.format(n, example))
|
||||||
# Outputs
|
# Outputs
|
||||||
outs = RegOutput.get_registered()
|
outs = RegOutput.get_registered()
|
||||||
f.write('\noutputs:\n')
|
f.write('\noutputs:\n')
|
||||||
|
|
@ -685,4 +689,3 @@ def create_example(pcb_file, out_dir, copy_options, copy_expand):
|
||||||
f.write(" description: '{}'\n".format(layer.description))
|
f.write(" description: '{}'\n".format(layer.description))
|
||||||
else:
|
else:
|
||||||
f.write(' layers: {}\n'.format(layers))
|
f.write(' layers: {}\n'.format(layers))
|
||||||
f.write('\n')
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue