]> www.fi.muni.cz Git - bike-lights.git/commitdiff
Makefile: schematics file printing
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 30 Oct 2012 15:41:15 +0000 (16:41 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 12 Nov 2012 22:47:45 +0000 (23:47 +0100)
The image.scm file taken from geda sources, in order to be independent
on actual geda install directories.

schematics/Makefile
schematics/image.scm [new file with mode: 0644]

index d987f9699f0457dcdef7354d7b5cac195ac63e97..ff6589b474575aeb1596080d4f3241410d9e298b 100644 (file)
@@ -1,5 +1,5 @@
 WEB_DIR=/home/kas/html/bike-lights/
-WEB_FILES=pcb-back.png pcb-front.png
+WEB_FILES=pcb-back.png pcb-front.png schematics.png
 GERBER_FILES=\
        lights.top.gbr \
        lights.bottom.gbr \
@@ -15,9 +15,9 @@ all:
 clean:
        rm -f lights.cmd lights.jpg lights.net lights.new.pcb lights.pcb- \
                lights.png lights.ps lights.sch~ pcb-back.png pcb-front.png \
-               *.gbr *.cnc
+               schematics.png *.gbr *.cnc
 
-web: pcb-back.png pcb-front.png
+web: pcb-back.png pcb-front.png schematics.png
        test -d $(WEB_DIR) && install -m 644 $(WEB_FILES) $(WEB_DIR)
 
 lights.pcb: lights.sch lights.prj
@@ -31,6 +31,9 @@ pcb-back.png: lights.pcb
        pcb -x png --dpi 150 --photo-mode --photo-flip-x lights.pcb \
                && mv lights.png $@
 
+schematics.png: lights.sch
+       gschem -s image.scm lights.sch -o schematics.png
+
 gerber: $(GERBER_FILES)
 
 $(GERBER_FILES): lights.pcb
diff --git a/schematics/image.scm b/schematics/image.scm
new file mode 100644 (file)
index 0000000..e2bd3e0
--- /dev/null
@@ -0,0 +1,21 @@
+;; $Id$
+;;
+;; This file may be used to produce png files from gschem schematics from the
+;; command line.  Typical usage is:
+;;
+;;   gschem -p -o mysch.png -s /path/to/this/file/image.scm mysch.sch
+;;
+;; The schematic in "mysch.sch" will be exported to the file "mysch.png"
+
+(image-size 1024 768)
+;(image-size 3200 2400)
+(image-color "enabled")
+;(image-color "disabled")
+
+; You need call this after you call any rc file function
+(gschem-use-rc-values)
+
+; filename is specified on the command line
+(gschem-image "dummyfilename")
+
+(gschem-exit)