[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (57873daeadfaf1c2966a7c30d5c839c921c5af9d)



The branch, master has been updated
       via  57873daeadfaf1c2966a7c30d5c839c921c5af9d (commit)
      from  1d82803aa20acc5e379e53a548a0ba4e29d23339 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 tools/Makefile.am |    3 +-
 tools/pcbdiff     |   64 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 1 deletions(-)
 create mode 100755 tools/pcbdiff


=================
 Commit Messages
=================

commit 57873daeadfaf1c2966a7c30d5c839c921c5af9d
Author: Alan Somers <asomers@xxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Adding a script to graphically diff PCB files

:100644 100644 d9665a9... f350471... M	tools/Makefile.am
:000000 100755 0000000... 00378cd... A	tools/pcbdiff

=========
 Changes
=========

commit 57873daeadfaf1c2966a7c30d5c839c921c5af9d
Author: Alan Somers <asomers@xxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Adding a script to graphically diff PCB files

diff --git a/tools/Makefile.am b/tools/Makefile.am
index d9665a9..f350471 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -21,7 +21,8 @@ TOOLS= \
 	tgo2pcb.tcl \
 	MergePCBPS \
 	Merge_dimPCBPS \
-	PCB2HPGL 
+	PCB2HPGL \
+	pcbdiff
 
 DIST_SCM= \
 	gnet-pcbfwd.scm
diff --git a/tools/pcbdiff b/tools/pcbdiff
new file mode 100755
index 0000000..00378cd
--- /dev/null
+++ b/tools/pcbdiff
@@ -0,0 +1,64 @@
+#! /bin/sh
+
+usage ()
+{
+  echo Usage: 
+  echo \\tpcbdiff firstfile secondfile
+  echo \\tView a graphical diff of PCB files
+  echo
+  echo \\tTo use with git, just place this script in your PATH and do
+  echo \\tgit difftool -x pcbdiff ...
+  echo
+  echo \\tTo use with mercurial, add the following lines to your .hgrc:
+  echo \\t\\t[extensions]
+  echo \\t\\thgext.extdiff =
+  echo \\t\\t[extdiff]
+  echo \\t\\tcmd.pcbdiff = /PATH/TO/pcbdiff
+  echo \\tthen to invoke it, do
+  echo \\thg pcbdiff ...
+  echo
+  echo \\tTo use with subversion, place it in your PATH and do
+  echo \\tsvn diff --diff-cmd pcbdiff ...
+
+  echo \\tRequirements: Imagemagick and gschem be installed
+}
+
+
+for PROG in pcb convert composite
+do
+  if which $PROG > /dev/null
+  then 
+    true
+  else 
+    echo "$PROG is not found.  Either it is not installed, or not in your PATH"
+    exit 1
+  fi
+done
+
+#In case the script was invoked with extra option arguments, throw them away
+shift `expr $# - 2`
+
+if test -d $1 -o -d $2
+  then echo "ERROR: pcbdiff cannot diff entire directories"
+  exit 1
+fi
+
+LEFTFILE=$1
+RIGHTFILE=$2
+LEFTPNG=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+RIGHTPNG=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+LEFTBNW=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+RIGHTBNW=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+DIFFPNG=`mktemp --tmpdir pcbdiff.XXXXXXXXXX`
+
+pcb -x png --dpi 200 --only-visible --photo-mode --outfile $LEFTPNG $LEFTFILE
+pcb -x png --dpi 200 --only-visible --photo-mode --outfile $RIGHTPNG $RIGHTFILE
+convert -colorspace gray $LEFTPNG $LEFTBNW
+convert -colorspace gray $RIGHTPNG $RIGHTBNW
+composite -stereo 0 $LEFTBNW $RIGHTBNW $DIFFPNG
+display $DIFFPNG
+rm $LEFTPNG
+rm $RIGHTPNG
+rm $LEFTBNW
+rm $RIGHTBNW
+rm $DIFFPNG




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs