add all materials
This commit is contained in:
parent
01e7a23ae2
commit
2ea0c0b60c
43 changed files with 20448 additions and 0 deletions
37
setup/generate_materials.py
Normal file
37
setup/generate_materials.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
MSVG = 'template.svg'
|
||||
TEMPL = '0xNN'
|
||||
NREG = 4
|
||||
N = 30
|
||||
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
if N > 255:
|
||||
print('cannot do it!')
|
||||
sys.exit()
|
||||
|
||||
addresses = [hex(i).replace("0x", "0x0") for i in range(N//2+1)] + \
|
||||
[hex(i) for i in range(N//2+1,N)] + \
|
||||
[f'REG{i}' for i in range(NREG)]
|
||||
|
||||
msvg = open(MSVG).read()
|
||||
delete = []
|
||||
to_join = []
|
||||
for a in addresses:
|
||||
print(f'Processing {a}...')
|
||||
new_svg = a+MSVG
|
||||
new_svg_pdf = new_svg.replace('.svg', '.pdf')
|
||||
with open(new_svg, 'wt') as svg:
|
||||
svg.write(msvg.replace(TEMPL,a))
|
||||
delete.extend([new_svg, new_svg_pdf])
|
||||
subprocess.run(['inkscape', '--export-filename='+new_svg_pdf, new_svg], capture_output=True)
|
||||
to_join.append(new_svg_pdf)
|
||||
|
||||
subprocess.run(['pdftk'] + to_join + ['output', 'materials.pdf'], capture_output=True)
|
||||
subprocess.check_call(['rm'] + delete)
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
setup/materials.pdf
Normal file
BIN
setup/materials.pdf
Normal file
Binary file not shown.
105
setup/template.svg
Normal file
105
setup/template.svg
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="297mm"
|
||||
height="210mm"
|
||||
viewBox="0 0 297 210"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
sodipodi:docname="template.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showguides="false"
|
||||
inkscape:zoom="0.8979798"
|
||||
inkscape:cx="543.44207"
|
||||
inkscape:cy="383.08211"
|
||||
inkscape:window-width="1681"
|
||||
inkscape:window-height="1210"
|
||||
inkscape:window-x="654"
|
||||
inkscape:window-y="108"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<rect
|
||||
x="416.49044"
|
||||
y="455.46682"
|
||||
width="189.31384"
|
||||
height="63.475816"
|
||||
id="rect3" />
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#000000;stroke-width:0.264999"
|
||||
d="M 8.5446427,90.75 C 284.33035,91.339285 283.74107,91.339285 283.74107,91.339285"
|
||||
id="path1" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
transform="scale(0.26458333)"
|
||||
id="text3"
|
||||
style="font-size:16px;line-height:100%;font-family:'Exo 2';-inkscape-font-specification:'Exo 2, ';text-align:start;text-decoration-color:#000000;letter-spacing:0px;word-spacing:-1.2px;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect3);fill:#000000;stroke:#000000;stroke-width:11.3386;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:4.23333px;line-height:100%;font-family:'Exo 2';-inkscape-font-specification:'Exo 2, ';text-align:start;text-decoration-color:#000000;letter-spacing:0px;word-spacing:-0.3175px;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#000000;stroke:#000000;stroke-width:0.1;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="113.4375"
|
||||
y="140.83928"
|
||||
id="text4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4"
|
||||
style="stroke-width:0.1;stroke-dasharray:none;stroke:#000000;fill:#000000"
|
||||
x="113.4375"
|
||||
y="140.83928" /></text>
|
||||
<path
|
||||
style="fill:#000000;stroke:#000000;stroke-width:2.87555;stroke-dasharray:11.50220013,2.87555003;stroke-opacity:1;stroke-dashoffset:0"
|
||||
d="M 13.503009,105.28242 C 283.49699,104.71758 283.49699,104.71758 283.49699,104.71758"
|
||||
id="path2" />
|
||||
<path
|
||||
style="fill:#000000;stroke:#000000;stroke-width:2.87555;stroke-dasharray:11.50220013,2.87555003;stroke-opacity:1;stroke-dashoffset:0"
|
||||
d="M 13.503011,199.34547 C 283.49699,198.78063 283.49699,198.78063 283.49699,198.78063"
|
||||
id="path2-1" />
|
||||
<path
|
||||
style="fill:#000000;stroke:#000000;stroke-width:2.87555;stroke-dasharray:11.50220013,2.87555003;stroke-opacity:1;stroke-dashoffset:0"
|
||||
d="m 13.50301,12.253503 c 269.99398,-0.56484 269.99398,-0.56484 269.99398,-0.56484"
|
||||
id="path2-4" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:50.8px;line-height:100%;font-family:'Exo 2';-inkscape-font-specification:'Exo 2, ';text-align:start;text-decoration-color:#000000;letter-spacing:0px;word-spacing:-0.3175px;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#000000;stroke:#000000;stroke-width:0.1;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="84.542786"
|
||||
y="162.20676"
|
||||
id="text5"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'MesloLGL Nerd Font Mono';-inkscape-font-specification:'MesloLGL Nerd Font Mono';stroke-width:0.1"
|
||||
x="84.542786"
|
||||
y="162.20676">0xNN</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:50.8px;line-height:100%;font-family:'Exo 2';-inkscape-font-specification:'Exo 2, ';text-align:start;text-decoration-color:#000000;letter-spacing:0px;word-spacing:-0.3175px;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#000000;stroke:#000000;stroke-width:0.1;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="-212.45721"
|
||||
y="-47.793243"
|
||||
id="text5-7"
|
||||
transform="scale(-1)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5-4"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50.8px;font-family:'MesloLGL Nerd Font Mono';-inkscape-font-specification:'MesloLGL Nerd Font Mono';stroke-width:0.1"
|
||||
x="-212.45721"
|
||||
y="-47.793243">0xNN</tspan></text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
Loading…
Add table
Add a link
Reference in a new issue