|
@@ -9,14 +9,20 @@ cp -r ../hardware/plot src
|
9
|
9
|
|
10
|
10
|
echo "Generating plot includes"
|
11
|
11
|
rm -rf src/inc_dispensy_sch.md
|
12
|
|
-for f in src/plot/dispensy_sch.svg/*.svg; do
|
|
12
|
+echo "<script src=\"js/svg-pan-zoom.js\" charset=\"UTF-8\"></script>" >> src/inc_dispensy_sch.md
|
|
13
|
+for f in `ls src/plot/dispensy_sch.svg/*.svg | sort -r`; do
|
13
|
14
|
file=`echo $f | sed 's:src/:./:g'`
|
14
|
15
|
name=`echo $f | sed 's:src/plot/dispensy_sch.svg/::g' | sed 's:.svg::g'`
|
|
16
|
+ echo $name
|
15
|
17
|
echo "<h2>$name</h2>" >> src/inc_dispensy_sch.md
|
16
|
18
|
echo "<div style=\"background-color: white;\">" >> src/inc_dispensy_sch.md
|
17
|
|
- echo "<a href=\"$file\">" >> src/inc_dispensy_sch.md
|
18
|
|
- echo "<img src=\"$file\" alt=\"Main-Board PCB layout as SVG\">" >> src/inc_dispensy_sch.md
|
19
|
|
- echo "</a></div>" >> src/inc_dispensy_sch.md
|
|
19
|
+ echo "<embed type=\"image/svg+xml\" src=\"$file\" id=\"pz_$name\" style=\"width:100%;\"/>" >> src/inc_dispensy_sch.md
|
|
20
|
+ echo "<script>" >> src/inc_dispensy_sch.md
|
|
21
|
+ echo "document.getElementById('pz_$name').addEventListener('load', function(){" >> src/inc_dispensy_sch.md
|
|
22
|
+ echo "svgPanZoom(document.getElementById('pz_$name'), {controlIconsEnabled: true});" >> src/inc_dispensy_sch.md
|
|
23
|
+ echo "})" >> src/inc_dispensy_sch.md
|
|
24
|
+ echo "</script>" >> src/inc_dispensy_sch.md
|
|
25
|
+ echo "</div>" >> src/inc_dispensy_sch.md
|
20
|
26
|
echo >> src/inc_dispensy_sch.md
|
21
|
27
|
done
|
22
|
28
|
|