This guide takes you end to end: from a photo of your board to an interactive pinout you can drop into a documentation site. It should take about five minutes.
PinConnect has three tools, used in sequence:
- pinout-design: a browser-based designer that turns a board image into a TOML config.
- pinout-gen: a CLI that reads that TOML and generates a single interactive HTML pinout.
- pinout-embed: an optional Markdown extension that embeds the generated HTML into MkDocs / Zensical sites.
You only need the first two to get a working pinout. The third is for people publishing to a Markdown docs site.
- Python 3.9 or newer (
python --version) - A top-down image of your board (PNG, JPG, or any other format your browser can display)
- A copy of this repository
The designer is a static web app. It reads its connector, theme, and symbol data over fetch(), so it must be served over HTTP — opening index.html directly with file:// will not work.
Start a local server from the pinout_design folder:
PowerShell
cd pinout_design
python -m http.server 8000Linux / macOS
cd pinout_design
python3 -m http.server 8000Then open http://localhost:8000 in your browser.
In the designer:
- Click Open Image and select your board photo.
- Click + Add Connector, drag a box over a connector on the image, then fill in the New Connector dialog (an ID is suggested for you, and the name defaults to the ID) and click Create. Draw mode switches off after each one, so click the button again for the next connector.
- Select a connector to refine it in the editor panel: its type, name, description, and per-pin labels and colors.
- Optionally pick a Theme from the toolbar to change how the generated pinout will look.
- Watch the TOML Source pane update live as you work.
- Click Save TOML to save your board config (for example
board.toml).
Put the saved .toml next to your board image — the next step expects them together.
See pinout-design for a full tour of the designer.
Install the generator from the repository root. Using a virtual environment is recommended but optional.
PowerShell
python -m venv venv
./venv/Scripts/activate
pip install .\pinout_genLinux / macOS
python3 -m venv venv
source venv/bin/activate
pip install ./pinout_genThis installs the pinout-gen command. Run it on your config:
pinout-gen board.tomlBy default this writes board.pinout.html next to the config. Use -o to choose a different path:
pinout-gen board.toml -o docs/my-board.htmlA theme sets the generated page's colors, fonts, and layout behavior. Five ship with the tool — default, midnight, ocean, slate, and terminal — and -t picks one for a single run, overriding whatever the board config says:
pinout-gen board.toml -t midnightKeep the image alongside the output. By default the generated HTML links to your board image by the same relative path used in the TOML — it is not embedded. Make sure the image file sits next to the HTML (or serve both from the same folder) or the diagram will show a broken image. To embed the image into the file instead, add
-i:pinout-gen board.toml -i. Note that-icovers the image only — the default theme still loads its font from Google Fonts, so see themes if you need output with no external references at all.
Open the resulting .html file in a browser to check your interactive pinout. You should get something like this:
See generating HTML and board TOML reference for more, or Installation for editable installs and optional extras.
If you publish with MkDocs or Zensical, pinout-embed lets you drop the generated pinout into a page with an image-style tag:
{ type=application/pinout style="min-height:60vh;width:100%" }The extension replaces that tag with a responsive <iframe> at build time.
See pinout-embed for installation and configuration.
- Concepts: how the pieces fit together and the three kinds of TOML file — board, connector type, and theme.
- pinout-design: designing configs visually.
- pinout-gen: CLI usage, board TOML, and connector types.
- themes: restyle the pinout's colors, fonts, and behaviors, or write your own theme.
- pinout-embed: embedding in a Markdown site.
