r5173 - in trunk/gta02-core: . expanded scripts
werner at docs.openmoko.org
werner at docs.openmoko.org
Sun Jun 21 20:01:37 CEST 2009
Author: werner
Date: 2009-06-21 20:01:37 +0200 (Sun, 21 Jun 2009)
New Revision: 5173
Modified:
trunk/gta02-core/Makefile
trunk/gta02-core/expanded/Makefile
trunk/gta02-core/scripts/all-sheets-ps
Log:
Make overviews in PDF as well. Pre-shrink main schematics to A4.
scripts/all-sheets-ps: added option --pdf to generate PDF instead of Postscript
scripts/all-sheets-ps: added option --shrink to shrink the file from A3 to A4
expanded/Makefile, Makefile: produce overviews in PDF as well
Makefile: shrink schematics to A4
Modified: trunk/gta02-core/Makefile
===================================================================
--- trunk/gta02-core/Makefile 2009-06-21 17:23:41 UTC (rev 5172)
+++ trunk/gta02-core/Makefile 2009-06-21 18:01:37 UTC (rev 5173)
@@ -6,11 +6,14 @@
gen generate:
eeschema --plot `pwd`/gta02-core.sch
- GS_OPTIONS=-sPAPERSIZE=a3 scripts/all-sheets-ps gta02-core
+ # For A3, remove the --shrink and prepend
+ # GS_OPTIONS=-sPAPERSIZE=a3
+ scripts/all-sheets-ps --shrink gta02-core
gzip -f -9 gta02-core-all.ps
+ scripts/all-sheets-ps --shrink --pdf gta02-core
upload: generate
- scp gta02-core-all.ps.gz \
+ scp gta02-core-all.ps.gz gta02-core-all.pdf \
werner at sita.openmoko.org:public_html/gta02-core/
sch:
Modified: trunk/gta02-core/expanded/Makefile
===================================================================
--- trunk/gta02-core/expanded/Makefile 2009-06-21 17:23:41 UTC (rev 5172)
+++ trunk/gta02-core/expanded/Makefile 2009-06-21 18:01:37 UTC (rev 5173)
@@ -7,9 +7,10 @@
eeschema --plot `pwd`/gta02-core-expanded.sch
../scripts/all-sheets-ps gta02-core-expanded
gzip -f -9 gta02-core-expanded-all.ps
+ ../scripts/all-sheets-ps --pdf gta02-core-expanded
upload: generate
- scp gta02-core-expanded-all.ps.gz \
+ scp gta02-core-expanded-all.ps.gz gta02-core-expanded-all.pdf \
werner at sita.openmoko.org:public_html/gta02-core/
sch:
Modified: trunk/gta02-core/scripts/all-sheets-ps
===================================================================
--- trunk/gta02-core/scripts/all-sheets-ps 2009-06-21 17:23:41 UTC (rev 5172)
+++ trunk/gta02-core/scripts/all-sheets-ps 2009-06-21 18:01:37 UTC (rev 5173)
@@ -1,5 +1,22 @@
-#!/bin/sh
+#!/bin/bash
+ps=true
+pdf=false
+shrink=false
+cmd=cat
+
+while [ "${1#-}" != "$1" ]; do
+ case "$1" in
+ --pdf)
+ ps=false
+ pdf=true;;
+ --shrink)
+ cmd="psresize -Pa3 -pa4"
+ shrink=true;;
+ esac
+ shift
+done
+
B=${1:-gta02-core}
OUT=$B-all
@@ -7,9 +24,17 @@
SHEETS="$SHEETS $B-AUDIO $B-USB $B-IO $B-LCM $B-SD-SIM"
SHEETS="$SHEETS $B-GPS $B-BT $B-WLAN"
-{
- sed 1q $B.ps
- sed '/^%%Orientation: /q;d' $B.ps
- sed '/^%%DocumentMedia: /q;d' $B.ps
- psmerge `for n in $SHEETS; do [ -f $n.ps ] && echo $n.ps; done` | sed 1d
-} >$OUT.ps
+if $ps; then
+ {
+ sed 1q $B.ps
+ sed '/^%%Orientation: /q;d' $B.ps
+ $shrink || sed '/^%%DocumentMedia: /q;d' $B.ps
+ eval psmerge `for n in $SHEETS; do [ -f $n.ps ] && \
+ echo "<($cmd $n.ps)"; done` | sed 1d
+ } >$OUT.ps
+fi
+
+if $pdf; then
+ eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$OUT.pdf -f \
+ `for n in $SHEETS; do [ -f $n.ps ] && echo "<($cmd $n.ps)"; done`
+fi
More information about the commitlog
mailing list