Skip to content

Commit 1f0e7ea

Browse files
committed
Enhance PDF generation by including silkscreen layers; add image generation workflow for KiCad
1 parent f0a7946 commit 1f0e7ea

File tree

4 files changed

+74
-2
lines changed

4 files changed

+74
-2
lines changed

.github/workflows/kicad.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
101101
- name: Generate PDFs
102102
run: |
103-
kicad-cli pcb export pdf --output=pcb.pdf --layers=F.Cu,In1.Cu,In2.Cu,B.Cu,Edge.Cuts tuxkeychain.kicad_pcb
103+
kicad-cli pcb export pdf --output=pcb.pdf --layers=F.Cu,In1.Cu,In2.Cu,B.Cu,Edge.Cuts,F.Silkscreen,B.Silkscreen tuxkeychain.kicad_pcb
104104
kicad-cli sch export pdf --output=schematic.pdf tuxkeychain.kicad_sch
105105
106106
- name: Upload PDFs

.github/workflows/kicad_images.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Generate KiCad Images
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
images:
16+
name: Generate Images
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install KiCad 9.0
23+
run: |
24+
sudo add-apt-repository --yes ppa:kicad/kicad-9.0-releases
25+
sudo apt update
26+
sudo apt install --install-recommends kicad poppler
27+
28+
- name: Generate Images
29+
run: |
30+
kicad-cli pcb render --output=images/pcbf.png --side=bottom tuxkeychain.kicad_pcb
31+
kicad-cli pcb render --output=images/pcbb.png --side=bottom tuxkeychain.kicad_pcb
32+
kicad-cli sch export pdf --output=/tmp/schematic.pdf tuxkeychain.kicad_sch
33+
34+
# convert schematic to png with poppler
35+
pdftoppm -png /tmp/schematic.pdf > images/schematic.png
36+
37+
- name: Commit and push images
38+
run: |
39+
git config --global user.name "GitHub Actions"
40+
git config --global user.email "actions@github.com"
41+
git add images/*
42+
git commit -m "Add generated images"
43+
git push

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@ NOTE: This is still in the prototype stage, changes to the design are likely. It
1616
The Allwinner F1C100s footprint/symbol is from https://github.com/thirtythreeforty/3340_kicad (F1C100s symbol, QFN-88_EP_10x10_Pitch0.4mm footprint).
1717
Same for the JW5211 symbol and footprint.
1818

19-
Schematic heavily based on the business card design by thirtythreeforty (https://www.thirtythreeforty.net/posts/2019/12/my-business-card-runs-linux/businesscard.pdf).
19+
Schematic heavily based on the business card design by thirtythreeforty (https://www.thirtythreeforty.net/posts/2019/12/my-business-card-runs-linux/businesscard.pdf).
20+
21+
## Images
22+
|PCB|Schematic|
23+
|---|---|
24+
|![PCB Front](images/pcbf.png)|![Schematic](images/schematic.png)|
25+
|![PCB Back](images/pcbb.png)|-|

tuxkeychain.kicad_pcb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,28 @@
141141
)
142142
)
143143
(net 0 "")
144+
(gr_rect
145+
(start 84.2 45.1)
146+
(end 118.8 70.6)
147+
(stroke
148+
(width 0.05)
149+
(type default)
150+
)
151+
(fill no)
152+
(layer "Edge.Cuts")
153+
(uuid "a60c6458-5ceb-4af2-8934-5af2fde9460c")
154+
)
155+
(gr_text "tmp\n"
156+
(at 93.2 53.2 0)
157+
(layer "F.SilkS")
158+
(uuid "d29fe543-7eae-4124-b5c7-43f0278fb319")
159+
(effects
160+
(font
161+
(size 1 1)
162+
(thickness 0.1)
163+
)
164+
(justify left bottom)
165+
)
166+
)
144167
(embedded_fonts no)
145168
)

0 commit comments

Comments
 (0)