| 252 |
jelle |
1 |
#!/bin/bash
|
|
|
2 |
|
|
|
3 |
# date: 2008-11-02
|
|
|
4 |
# version: v0.1.1j
|
|
|
5 |
# creator: Jelle de Jong <jelledejong@powercraft.nl>
|
|
|
6 |
# project: openarm sbc
|
|
|
7 |
# licence: gplv3
|
|
|
8 |
|
| 277 |
agaran |
9 |
# this file wont work with no $DISPLAY and requires psnup
|
|
|
10 |
# so imho it should check for DISPLAY at least
|
|
|
11 |
# like that
|
|
|
12 |
|
|
|
13 |
if [ "x$DISPLAY" == "x" ]; then
|
|
|
14 |
echo "Its quite possible that you aren't executing this script from X system, or"
|
|
|
15 |
echo "you don't have DISPLAY env variable set. I cannot continue because gschem won't"
|
|
|
16 |
echo "work unless you set one, even with xserver with dummy output i hope"
|
|
|
17 |
exit
|
|
|
18 |
fi
|
|
|
19 |
|
| 252 |
jelle |
20 |
echo ';; This file may be used to print gschem schematics from the
|
|
|
21 |
;; command line. Typical usage is:
|
|
|
22 |
;;
|
|
|
23 |
;; gschem -p -o mysch.ps -s /path/to/this/file/print.scm mysch.sch
|
|
|
24 |
;;
|
|
|
25 |
;; The schematic in "mysch.sch" will be printed to the file "mysch.ps"
|
|
|
26 |
;;
|
| 253 |
jelle |
27 |
;; documentation: less /etc/gEDA/system-gschemrc
|
| 252 |
jelle |
28 |
;; documentation: less /user/share/gEDA/scheme/print.scm
|
|
|
29 |
;;
|
|
|
30 |
|
|
|
31 |
(log-window "later")
|
|
|
32 |
|
|
|
33 |
(output-type "limits")
|
|
|
34 |
(paper-size 16.54 11.69)
|
|
|
35 |
(output-text "ps")
|
|
|
36 |
(output-type "extents")
|
|
|
37 |
(output-orientation "landscape")
|
|
|
38 |
(output-color "enabled")
|
|
|
39 |
|
|
|
40 |
; You need call this after you call any rc file function
|
|
|
41 |
(gschem-use-rc-values)
|
|
|
42 |
|
|
|
43 |
; filename is specified on the command line
|
|
|
44 |
(gschem-postscript "dummyfilename")
|
|
|
45 |
|
|
|
46 |
(gschem-exit)' > ~/openarm/working/gschem/pdf/print.scm
|
|
|
47 |
|
| 253 |
jelle |
48 |
psnup -p A4 -l -m0.5cm infile.ps outfile.ps
|
|
|
49 |
|
| 252 |
jelle |
50 |
gschem -p -o ~/openarm/working/gschem/pdf/01-power-supply.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/01-power-supply.sch
|
|
|
51 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/01-power-supply.ps ~/openarm/working/gschem/pdf/01-power-supply.pdf
|
|
|
52 |
|
|
|
53 |
gschem -p -o ~/openarm/working/gschem/pdf/02-power-on-reset.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/02-power-on-reset.sch
|
|
|
54 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/02-power-on-reset.ps ~/openarm/working/gschem/pdf/02-power-on-reset.pdf
|
|
|
55 |
|
|
|
56 |
gschem -p -o ~/openarm/working/gschem/pdf/03-jtag.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/03-jtag.sch
|
|
|
57 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/03-jtag.ps ~/openarm/working/gschem/pdf/03-jtag.pdf
|
|
|
58 |
|
|
|
59 |
gschem -p -o ~/openarm/working/gschem/pdf/04-sdram.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/04-sdram.sch
|
|
|
60 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/04-sdram.ps ~/openarm/working/gschem/pdf/04-sdram.pdf
|
|
|
61 |
|
|
|
62 |
gschem -p -o ~/openarm/working/gschem/pdf/05-flash.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/05-flash.sch
|
|
|
63 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/05-flash.ps ~/openarm/working/gschem/pdf/05-flash.pdf
|
|
|
64 |
|
|
|
65 |
gschem -p -o ~/openarm/working/gschem/pdf/06-micro-sd.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/06-micro-sd.sch
|
|
|
66 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/06-micro-sd.ps ~/openarm/working/gschem/pdf/06-micro-sd.pdf
|
|
|
67 |
|
|
|
68 |
gschem -p -o ~/openarm/working/gschem/pdf/07-ethernet.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/07-ethernet.sch
|
|
|
69 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/07-ethernet.ps ~/openarm/working/gschem/pdf/07-ethernet.pdf
|
|
|
70 |
|
|
|
71 |
gschem -p -o ~/openarm/working/gschem/pdf/08-rs232.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/08-rs232.sch
|
| 253 |
jelle |
72 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/08-rs232.ps ~/openarm/working/gschem/pdf/08-rs232.pdf
|
| 252 |
jelle |
73 |
|
|
|
74 |
gschem -p -o ~/openarm/working/gschem/pdf/09-oscillators.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/09-oscillators.sch
|
|
|
75 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/09-oscillators.ps ~/openarm/working/gschem/pdf/09-oscillators.pdf
|
|
|
76 |
|
|
|
77 |
gschem -p -o ~/openarm/working/gschem/pdf/10-usb.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/10-usb.sch
|
|
|
78 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/10-usb.ps ~/openarm/working/gschem/pdf/10-usb.pdf
|
|
|
79 |
|
|
|
80 |
gschem -p -o ~/openarm/working/gschem/pdf/11-connectors.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/11-connectors.sch
|
|
|
81 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/11-connectors.ps ~/openarm/working/gschem/pdf/11-connectors.pdf
|
|
|
82 |
|
|
|
83 |
gschem -p -o ~/openarm/working/gschem/pdf/12-lpc3180-power.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/12-lpc3180-power.sch
|
|
|
84 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/12-lpc3180-power.ps ~/openarm/working/gschem/pdf/12-lpc3180-power.pdf
|
|
|
85 |
|
|
|
86 |
gschem -p -o ~/openarm/working/gschem/pdf/13-can.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/13-can.sch
|
|
|
87 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/13-can.ps ~/openarm/working/gschem/pdf/13-can.pdf
|
|
|
88 |
|
|
|
89 |
gschem -p -o ~/openarm/working/gschem/pdf/14-spi.ps -s ~/openarm/working/gschem/pdf/print.scm ~/openarm/working/gschem/sch/14-spi.sch
|
|
|
90 |
ps2pdf14 -sPAPERSIZE=a3 ~/openarm/working/gschem/pdf/14-spi.ps ~/openarm/working/gschem/pdf/14-spi.pdf
|
|
|
91 |
|
|
|
92 |
exit
|