mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 08:57:10 +02:00
sch2fig/sch2pdf, Makefile (neo900.pdf): generate PDF for Neo900
This commit is contained in:
parent
d031e59811
commit
427e4d7d09
@ -41,3 +41,8 @@ neo900: $(NAME)
|
||||
$(KICAD_LIBS)/powered.lib \
|
||||
$(NEO900_HW)/neo900_SS_$(SHEET).sch \
|
||||
>out.fig
|
||||
|
||||
neo900.pdf: $(NAME) sch2pdf
|
||||
./sch2pdf -o $@ \
|
||||
$(NEO900_HW)/neo900.lib $(KICAD_LIBS)/powered.lib \
|
||||
$(NEO900_HW)/neo900.sch
|
||||
|
43
sch2fig/sch2pdf
Executable file
43
sch2fig/sch2pdf
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: $0 [-o output.pdf] [-q] file.lib ... file.sch" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
out=out.pdf
|
||||
quiet=false
|
||||
while [ "$1" ]; do
|
||||
case "$1" in
|
||||
-o) out=$2
|
||||
shift 2;;
|
||||
-q) quiet=true
|
||||
shift;;
|
||||
-*) usage;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ "$1" ] || usage
|
||||
|
||||
libs=
|
||||
while [ "$2" ]; do
|
||||
libs="$libs $1"
|
||||
shift
|
||||
done
|
||||
cmd=
|
||||
first=true
|
||||
for n in `sed '/\$Sheet/,/\$EndSheet/p;d' "$1" |
|
||||
sed '/F1 "\([^"]*\)" .*/s//\1/p;d'`; do
|
||||
$quiet || echo "$n" 1>&2
|
||||
./sch2fig $libs `dirname "$1"`/$n | fig2dev -L pdf >_tmp.pdf
|
||||
if $first; then
|
||||
mv _tmp.pdf "$out"
|
||||
first=false
|
||||
else
|
||||
pdfunite out.pdf _tmp.pdf _tmp2.pdf
|
||||
mv _tmp2.pdf "$out"
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user