Skip to content

Commit 5cfc792

Browse files
committed
some readme fixes
1 parent 8126bf8 commit 5cfc792

File tree

1 file changed

+59
-51
lines changed

1 file changed

+59
-51
lines changed

README.md

Lines changed: 59 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
# Pinout Leaf Generator
22

3-
Pinout diagrams for microcontrollers and other PCBs are well known, but it can be hard always comparing the pinout
4-
diagram with the real PCB, counting pins. One solution is to print out a diagram that has exactly the right size to push
5-
the pins through the paper and have the labels right next to the actual pin.
3+
Pinout diagrams for microcontrollers and other PCBs are well known, but it can be hard always comparing the pinout diagram with the real PCB, counting pins. One solution is to print out a diagram that has exactly the right size to push the pins through the paper and have the labels right next to the actual pin.
64

75
This project is meant for easily creating such pinout leafs.
86

9-
The pins can be described by a simple YAML based description and the tool automatically creates the diagram as a SVG.
7+
The pins can be described by a simple YAML-based description and the tool automatically creates the diagram as an SVG.
108

119
![Print Example](print-example.jpg)
1210

1311
## Features
1412

1513
* **SVG Output:**
1614
* Generates clean, scalable SVG diagrams.
17-
* Default sizes match the real world PCB exactly, just print at 100%
18-
* Fully self-contained, font and image resources are embedded into the file so it's fully portable
15+
* Default sizes match the real-world PCB exactly — just print at 100%.
16+
* Fully self-contained, font and image resources are embedded into the file so it's fully portable.
17+
1918
* **Configuration:**
2019
* Define pinouts, board dimensions, labels, and types using simple YAML or JSON files.
21-
* Custom types allow control over colors and legend labels
20+
* Custom types allow control over colors and legend labels.
21+
2222
* **Web Editor:**
2323
* Real-time preview of the diagram as you edit the configuration.
2424
* Syntax highlighting for YAML.
25-
* Download generated SVG diagrams
25+
* Download generated SVG diagrams.
26+
2627
* **CLI Tool:**
2728
* Process multiple configuration files or entire directories to generate SVG diagrams programmatically.
29+
2830
* **Front & Back Views:**
2931
* Automatically generates diagrams for both the front and back sides of the PCB.
3032

@@ -34,17 +36,17 @@ The pins can be described by a simple YAML based description and the tool automa
3436

3537
## Limits
3638

37-
* Only four rows of pins are supported
38-
* No weird arbitrary layouts
39-
* Only standard 0.1 inch pin raster supported (might change in the future)
39+
* Only four rows of pins are supported.
40+
* No weird arbitrary layouts.
41+
* Only the standard 0.1-inch pin raster is supported (might change in the future).
4042

4143
## Alternatives
4244

43-
* [Youtube: Feather Diagrams Walk-Through for Adafruit](https://www.youtube.com/watch?v=ndVs1UvK6AE) - doing it the manual way in Inkscape
44-
* [GenPinoutSVG](https://github.com/stevenj/GenPinoutSVG) - a Python tool using CSV files as input
45-
* [Pinion](https://yaqwsx.github.io/Pinion/) - creates pinout diagrams from KiCAD PCB files
46-
* [PCBDraw](https://github.com/yaqwsx/PcbDraw) - another KiCAD based tool
47-
* [Integrated Circuit Pinout Diagram Generator](https://github.com/cmfcmf/ic-pinout-diagram-generator) - probably closest to this project, but without an editor
45+
- [Youtube: Feather Diagrams Walk-Through for Adafruit](https://www.youtube.com/watch?v=ndVs1UvK6AE) doing it the manual way in Inkscape
46+
- [GenPinoutSVG](https://github.com/stevenj/GenPinoutSVG) a Python tool using CSV files as input
47+
- [Pinion](https://yaqwsx.github.io/Pinion/) creates pinout diagrams from KiCAD PCB files
48+
- [PCBDraw](https://github.com/yaqwsx/PcbDraw) another KiCAD-based tool
49+
- [Integrated Circuit Pinout Diagram Generator](https://github.com/cmfcmf/ic-pinout-diagram-generator) probably closest to this project, but without an editor
4850

4951
None of the tools above focus on dimensional accuracy and printing. They are more about creating diagrams for documentation or web pages.
5052

@@ -55,28 +57,31 @@ None of the tools above focus on dimensional accuracy and printing. They are mor
5557
1. Go to https://splitbrain.github.io/pinoutleaf/
5658
2. Edit the YAML configuration in the editor.
5759
3. The SVG diagrams will update automatically.
58-
4. Click the images to download them
60+
4. Click the images to download them.
5961

6062
Feel free to open an issue when you create a new pinout leaf and we can add it to the list of existing leafs.
6163

6264
### Premade Leafs
6365

64-
Check the [pinouts](public/pinouts) directory for boards that have already been defined. Open a pull request or ticket if you made one and want it included in the repo.
66+
Check the [pinouts](https://github.com/splitbrain/pinoutleaf/tree/gh-pages/pinouts) directory for boards that have already been defined.
67+
68+
Open a [pull request](https://github.com/splitbrain/pinoutleaf/pulls) or [ticket](https://github.com/splitbrain/pinoutleaf/issues) if you made one and want it included in the repo.
6569

6670
### Printing
6771

68-
* Download the SVG and open it in a SVG capable tool - your browser is fine.
69-
* Print and make sure your application or printer driver does not apply and scaling (scale: 100%)
70-
* Optionally poke holes in the marked pin holes with a needle
71-
* Push your PCB's pins through the paper, enjoy the labels next to the pins
72+
* Download the SVG and open it in an SVG-capable tool — your browser is fine.
73+
* Print and make sure your application or printer driver does not apply any scaling (scale: 100%).
74+
* Optionally poke holes in the marked pin holes with a needle.
75+
* Carefully push your PCB's pins through the paper; using a jumper wire can help with that.
76+
* Enjoy the labels next to the pins.
7277

7378
### Command-Line Interface (CLI)
7479

75-
1. Clone the repo
80+
1. Clone the repo.
7681
2. Install dependencies:
77-
```bash
78-
npm install
79-
```
82+
```bash
83+
npm install
84+
```
8085
3. Build the project (for web editor and CLI):
8186
```bash
8287
node build.js
@@ -85,24 +90,25 @@ npm install
8590
```bash
8691
node public/dist/cli.js path/to/your/config.yaml
8792
```
88-
4. The tool will generate corresponding `.svg` files (e.g., `config.front.svg`, `config.back.svg`) in the same directory
89-
as the input files.
93+
5. The tool will generate corresponding `.svg` files (e.g., `config.front.svg`, `config.back.svg`) in the same directory as the input files.
9094

9195
## Configuration Syntax
9296

9397
Diagrams are configured using YAML or JSON files. Most things have sensible defaults.
9498

99+
Note: only YAML is supported in the web editor.
100+
95101
### title
96102

97-
Defines the title of the diagram
103+
Defines the title of the diagram:
98104

99105
```yaml
100106
title: "My PCB"
101107
```
102108
103109
### size
104110
105-
The size of the PCB is defined in the number of pins (assuming a standard pin raster of 0.1 inch aka 2.54mm). Everything else is derived from this size. Best put your board on a breadboard and count.
111+
The size of the PCB is defined in the number of pins (assuming a standard pin raster of 0.1 inch, aka 2.54mm). Everything else is derived from this size. Best to put your board on a breadboard and count.
106112
107113
```yaml
108114
width: 4
@@ -111,32 +117,32 @@ height: 6
111117
112118
### pins
113119
114-
The tool supports up to four rows of pins: `left`, `right`, `top` and `bottom`. If your board does have a different layout, you're out of luck.
120+
The tool supports up to four rows of pins: `left`, `right`, `top`, and `bottom`. If your board does have a different layout, you're out of luck.
115121

116-
For each row, you define an array of pins. For each pin you define an array of `label:type` strings. You can have empty pins in a row.
122+
For each row, you define an array of pins. For each pin, you define an array of `label:type` strings. You can have empty pins in a row.
117123

118124
```yaml
119125
pins:
120126
left:
121127
- [ "GPIO5:gpio", "A5:analog", "MISO:spi" ]
122128
- [ "GPIO6:gpio", "MOSI:spi" ]
123-
-
129+
-
124130
- [ "GPIO20:gpio", "RX:uart" ]
125131
- [ "GPIO21:gpio", "TX:uart" ]
126132
right:
127133
-
128-
-
134+
-
129135
- [ "5V:power" ]
130136
- [ "GND:gnd" ]
131-
- [ "3V3:power"]
137+
- [ "3V3:power" ]
132138
```
133139

134140
### types
135141

136-
Types define the background, text color and legend label for a set of pins. Simply give the type a name, define the properties and then use it by name om the pins definition.
142+
Types define the background color, text color, and legend label for a set of pins. Simply give the type a name, define the properties, and then use it by name in the `pins` definition.
137143

138144
```yaml
139-
types:
145+
types:
140146
mytype:
141147
label: 'Special Pins'
142148
bgcolor: '#ff00ff'
@@ -145,21 +151,23 @@ Types define the background, text color and legend label for a set of pins. Simp
145151

146152
There are the following predefined types, which you can use without defining them yourself:
147153

148-
* `gpio`
149-
* `power`
150-
* `gnd`
151-
* `i2c`
152-
* `uart`
153-
* `spi`
154-
* `analog`
154+
- `gpio`
155+
- `power`
156+
- `gnd`
157+
- `i2c`
158+
- `uart`
159+
- `spi`
160+
- `analog`
155161

156162
### image
157163

158-
For nicer diagrams you can define background images (JPEG or PNG only) to use instead of a general green PCB background. You can set a front and back side image separately.
164+
For nicer diagrams, you can define background images (JPEG or PNG only) to use instead of the general green PCB background.
165+
166+
You can set a front and back side image separately. Images can be referenced as local files or as URLs. In both cases, the generator will try to actually embed the image in the generated SVG as a Data URL.
159167

160-
Images can be referenced as local file or as URL. In both cases the generator will try to actually embed the image in the generated SVG as a dataurl.
168+
By default, your image will be stretched to exactly match the size defined by the pins. However, your picture will probably not fit exactly. Using the `left`, `right`, `top`, and `bottom` properties, you can define offsets from the respective edges.
161169

162-
By default, your image will be stretched to exactly match the size defined by the pins. However, you picture will probably not fit exactly. Using the `left`, `right`, `top` and `bottom` properties you can define offsets from the respective edges. Negative numbers will move the image edge outwards, postive numbers inwards. The offsets are given in one-hundreds of a millimeter, eg. 100 is 1mm. Best interactively experiment in the web editor until the image fits.
170+
Negative numbers will move the image edge outward, positive numbers inward. The offsets are given in hundredths of a millimeter, e.g., 100 is 1mm. Best to interactively experiment in the web editor until the image fits.
163171

164172
```yaml
165173
image:
@@ -179,14 +187,14 @@ image:
179187

180188
### offsets
181189

182-
By default, the pin rows will sit on the edge of the defined board size. Sometimes you might want to define your board's size larger than the actual pin area is. You then can use the offsets setting to move a pi row further in.
190+
By default, the pin rows will sit on the edges of the defined board size. Sometimes you might want to define your board's size larger than the actual pin area. You can use the offsets setting to move a pin row further in.
183191

184-
For example the Raspberry Pi has two rows of Pins all the way to the right edge of a much larger board. In this case you might want to define the overall size of the board but then offset the left row of pins so it moves over nearly to the right edge.
192+
For example, the Raspberry Pi has two rows of pins all the way to the right edge of a much larger board. In this case, you might want to define the overall size of the board but then offset the left row of pins so it moves over nearly to the right edge.
185193

186-
Only use positive integers and be sure to not push your row outside of the size dimensions.
194+
Only use positive integers and be sure not to push your row outside of the size dimensions.
187195

188196
```yaml
189-
offsets:
197+
offsets:
190198
left: 0
191199
top: 0
192200
right: 0

0 commit comments

Comments
 (0)