summaryrefslogtreecommitdiff
path: root/new/make-dir-lib-source-test-data.sh
diff options
context:
space:
mode:
authorsaurabhb172020-02-26 16:20:48 +0530
committerGitHub2020-02-26 16:20:48 +0530
commitb77f5d9d8097c38159c6f60917995d6af13bbe1c (patch)
tree1392c90227aeea231c1d86371131e04c40382918 /new/make-dir-lib-source-test-data.sh
parentdadc4d490966a24efe15b5cc533ef8695986048a (diff)
parent003d02608917e7a69d1a98438837e94ccf68352a (diff)
downloadKiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.tar.gz
KiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.tar.bz2
KiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.zip
Merge pull request #4 from FOSSEE/develop
merging dev into master
Diffstat (limited to 'new/make-dir-lib-source-test-data.sh')
-rwxr-xr-xnew/make-dir-lib-source-test-data.sh150
1 files changed, 150 insertions, 0 deletions
diff --git a/new/make-dir-lib-source-test-data.sh b/new/make-dir-lib-source-test-data.sh
new file mode 100755
index 0000000..84f93c2
--- /dev/null
+++ b/new/make-dir-lib-source-test-data.sh
@@ -0,0 +1,150 @@
+#!/bin/sh
+
+BASEDIR=/tmp/eeschema-lib
+
+CATEGORIES="lions tigers kitties"
+
+PARTS="eyes ears feet"
+
+REVS="rev1 rev5 rev10"
+
+
+REFERENCE="
+ (reference U?
+ (effects (at 12 13 180)(font (size 7 10))(visible yes))
+ )"
+
+LINE="
+ (line
+ (pts (xy 12 13)(xy 12 20))(stroke 1.5)
+ )"
+
+RECT="
+ (rectangle
+ (start 4 5)(end 6 8)(stroke 2.3)(fill transparent)
+ )"
+
+CIRCLE="
+ (circle
+ (center 1 0)(radius 5)(stroke 2.1)(fill none)
+ )"
+
+ARC="
+ (arc
+ (pos 22 33)(radius 12)(start 2 4)(end 13 33)(stroke 2.3)(fill filled)
+ )"
+
+BEZIER="
+ (bezier
+ (fill none)(stroke 2.0)(pts (xy 0 1)(xy 2 4))
+ )"
+
+TEXT="
+ (text (at 23 23 90.0) \"This is some text\" (justify left bottom)(visible yes)(fill filled)
+ (font arial (size 8 12))
+ )"
+
+PIN1="
+ (pin out line (at 7 8 90)
+ (signal #WE (font (size 8 10) bold)(visible no))
+ (pad A23 (font (size 9 11) italic bold))
+ )"
+
+PIN2="
+ (pin in line (at 8 8)(visible yes)
+ (signal #WAIT (visible yes))
+ (pad A24 (visible yes))
+ )"
+
+PIN3="
+ (pin (pad A25))"
+
+PINS="
+ (pin (pad Z12))(pin (pad Y14))(pin (pad Z13))(pin (pad Y15))"
+
+
+PIN_SWAP="
+ (pin_swap A23 A24)"
+
+PIN_RENUM="
+ (pin_renum A24 B24)"
+
+PIN_RENAME="
+ (pin_rename B24 LED)"
+
+PIN_DELETE="
+ (pin_del B24)"
+
+PIN_MERGE="(pin_merge A23 (pads Z12 Y14))(pin_merge A25 (pads Z13 Y15))"
+
+
+PROP1="
+ (property mWatts 12
+ (effects (at 1 34 270)(font (size 5 9) italic bold)(visible no))
+ )"
+
+KEYWORDS="
+ (keywords varistor batcave einstein)"
+
+ALTERNATES="
+ (alternates 7400/7400_b 7400/7400_c)"
+
+
+
+for C in ${CATEGORIES}; do
+
+ mkdir -p $BASEDIR/$C
+
+ for P in ${PARTS}; do
+
+ for R in ${REVS}; do
+ echo "(part $C/$P (value 22)(footprint SM0805)(model Airplane)(datasheet http://favorite.pdf)
+ $REFERENCE
+ $LINE
+ $RECT
+ $CIRCLE
+ $ARC
+ $BEZIER
+ $TEXT
+ $PIN1
+ $PIN2
+ $PIN3
+ $PINS
+ $PROP1
+ $KEYWORDS
+ $ALTERNATES
+ $PIN_SWAP
+ $PIN_RENUM
+ $PIN_RENAME
+ $PIN_DELETE
+ $PIN_MERGE
+ )" > $BASEDIR/$C/$P.part.$R
+ done
+
+ # also make the part without a rev:
+ echo "(part $C/$P (value 22)(footprint SM0805)(model Airplane)(datasheet http://favorite.pdf)
+ $REFERENCE
+ $LINE
+ $RECT
+ $CIRCLE
+ $ARC
+ $BEZIER
+ $TEXT
+ $PIN1
+ $PIN2
+ $PIN3
+ $PINS
+ $PROP1
+ $KEYWORDS
+ $ALTERNATES
+ $PIN_SWAP
+ $PIN_RENUM
+ $PIN_RENAME
+ $PIN_DELETE
+ $PIN_MERGE
+ )" > $BASEDIR/$C/$P.part
+
+ done
+
+done
+