|
1 | | -# interactive-pinout |
2 | | -Interactive Pinout Generator |
| 1 | +# Interactive Pinout Generator |
| 2 | + |
| 3 | +Generating pinouts requires: |
| 4 | + |
| 5 | +- ECU connector photo (.jpg) |
| 6 | +- pinout metadata file in [YAML](https://en.wikipedia.org/wiki/YAML) format |
| 7 | + |
| 8 | +## Syntax of Connector YAML |
| 9 | + |
| 10 | +Each YAML file contains two sections: 'pins' and 'info' |
| 11 | + |
| 12 | +The 'pins' section contains a list of pins, each having the following fields: |
| 13 | + |
| 14 | +|field |description| |
| 15 | +|--------|-----------| |
| 16 | +|pin |a numeric id corresponding to the physical pin on the connector| |
| 17 | +|type |a short code to allow pins to be grouped and colored by type| |
| 18 | + |
| 19 | +The 'info' section contains information which is used to generate the interactive pinout. It contains the following fields: |
| 20 | + |
| 21 | +|field |description| |
| 22 | +|---------|-----------| |
| 23 | +|id |contains a short name for the connector, to be used in the URL when linking to a particular pin| |
| 24 | +|image |subsection which contains a single field, 'file', which contains the filename of the image, which is stored in the same directory as the YAML| |
| 25 | +|pins |subsection with a list of the pins' locations on the image. Its fields are 'pin', which matches to an 'id' in the main 'pins' section, 'x' and 'y', which are the coordinates on the image| |
| 26 | +|title |contains the title for the page. Only one connector for a particular board needs this field| |
| 27 | +|board_url|contains a URL for documentation, which will be placed as a link on the top of the page. Only one connector for a particular board needs this field| |
| 28 | +|name |contains a human-readable name for the connector| |
| 29 | +|order |contains an index to order the connectors on the page. The lower the number, the nearer the top of the page. If the 'order' field is not present, order is undefined, but will probably be sorted alphabetically by the file name| |
| 30 | + |
| 31 | +## Using this Action in Your Workflow |
| 32 | + |
| 33 | +Here is an example workflow step: |
3 | 34 |
|
4 | 35 | ``` |
5 | 36 | - name: Generate Pinouts |
|
0 commit comments