diff --git a/syntax.md b/syntax.md index 8d296be4..31524bf2 100644 --- a/syntax.md +++ b/syntax.md @@ -4,16 +4,16 @@ ```yaml connectors: # dictionary of all used connectors - X1: # unique connector designator/name + : # unique connector designator/name ... # connector attributes (see below) - X2: + : ... ... -cables: # dictionary of all used cables and wires - W1: # unique cable designator/name - ... # cable attributes (see below) - W2: +cables: # dictionary of all used cables and wires + : # unique cable designator/name + ... # cable attributes (see below) + : ... ... @@ -23,6 +23,12 @@ connections: # list of all connections to be made ... # connection set (see below) - ... + ... + +additional_bom_items: # custom items to add to BOM + - # BOM item (see below) + ... + ``` ## Connector attributes @@ -58,6 +64,12 @@ connections: # list of all connections to be made # loops and shorts (#48) loops: # TODO + # BOM options (all optional) + ignore_in_bom: # defaults to false TODO + bom_items: # list of additional BOM entries for this cable/bundle TODO + - # BOM item (see below) + ... + # auto-generation autogenerate: # optional; defaults to false; see below @@ -107,6 +119,12 @@ connections: # list of all connections to be made colors: # list of colors (see below) color_code: # one of the supported cable color codes (see below) + # BOM options (all optional) + ignore_in_bom: # defaults to false TODO + bom_items: # list of additional BOM entries for this cable/bundle TODO + - # BOM item (see below) + ... + # rendering information (all optional) show_name: # defaults to true show_wirecount: # defaults to true @@ -117,6 +135,34 @@ connections: # list of all connections to be made +## BOM items + +Connectors (both regular, and auto-generated), cables, and wires of a bundle are automatically added to the BOM, +unless the `ignore_in_bom` attribute is set to `true`. + +Additional BOM entries can be generated in the sections marked `` above. + + +:warning: BOM items inside connectors/cables are not implemented yet, but should be soon (#50) + +```yaml +- + description: + qty: # when used in the additional_bom_items section: + # manually specify qty. + # when used within a component: + # manually specify qty. + # pincount match number of pins of connector + # wirecount match number of wires of cable/bundle + # connectioncount match number of connected pins + # all the following are optional: + unit: + designators: + manufacturer: + manufacturer_part_number: + internal_part_number: +``` + ## Colors Colors are defined via uppercase, two character strings. @@ -202,7 +248,7 @@ attribute: | This is line 2. ``` -## Method 2 +### Method 2 By using double quoted strings, `\n` within the string is converted to a new line.