layout2image.py- generate KLE style SVG image from keyboard layoutlayout2schematic.py- generate KiCad schematic file from keyboard layoutlayout2url.py- generate KLE urllayout2openscad.py- generate plate for openscad (:warning: experimental)
The kbplacer project uses pyprojet.toml with hatch project manager.
It defines tools environment with required dependencies and scripts.
To execute, run:
$ hatch run tools:layout2image {args...}
$ hatch run tools:layout2schematic {args...}
$ hatch run tools:layout2url {args...}
$ hatch run tools:layout2openscad {args...}Alternatively, install required dependencies and run as regular python script:
python tools/layout2image.py {args...}
python tools/layout2schematic.py {args...}
python tools/layout2url.py {args...}
python tools/layout2openscad.py {args...}To generate schematic file and schematic image based on layout file:
hatch run tools:layout2schematic -in examples/2x2/via.json -out 2x2.kicad_sch
kicad-cli sch export svg -e 2x2.kicad_schTo generate layout image based on layout file:
hatch run tools:layout2image -in tests/data/ergogen-layouts/absolem-simple-points.yaml \
-out absolem.svgAs you can see, there are slight rotation issues on this generated image. This is the problem with SVG generation code because layout imported to KLE looks ok:
To generate KLE url for run:
hatch run tools:layout2url -in tests/data/ergogen-layouts/absolem-simple-points.yamlThis will produce following link.
To convert ergogen layouts to KLE see layout and format conversion script
