From: Eric S. Raymond Date: Sat, 15 Nov 2003 06:28:12 +0000 (+0000) Subject: Ready to ship. X-Git-Tag: 2.5~2 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=17f484f898e2a60a034b72afe11cd449a0a448c1;p=imgsizer.git Ready to ship. --- diff --git a/Makefile b/Makefile index b5accb1..33cf76c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Makefile for the imgsizer distribution -VERS=2.4 +VERS=2.5 # These choices are correct for Linux. Season to taste. BINDIR = /usr/bin @@ -20,7 +20,7 @@ clean: imgsizer.1: imgsizer.xml xmlto man imgsizer.xml -SOURCES = READ.ME Makefile \ +SOURCES = READ.ME Makefile imgsizer.spec \ imgsizer imgsizer.xml \ test-before.html test-converted.html test.png tnhd2.jpg @@ -40,14 +40,10 @@ dist: imgsizer-$(VERS).tar.gz # Make RPMs. You need to be root to make this work RPMROOT=/usr/src/redhat -RPM = rpmbuild -RPMFLAGS = -bb --target noarch -rpm: imgsizer-$(VERS).tar.gz - cp imgsizer-$(VERS).tar.gz $(RPMROOT)/SOURCES; - cp imgsizer.spec $(RPMROOT)/SPECS/imgsizer.spec - (cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) imgsizer.spec) - cp $(RPMROOT)/RPMS/noarch/imgsizer-$(VERS)*.rpm . - chown $$USER * +rpm: dist + rpmbuild --target noarch --define 'myversion $(VERS)' -ta imgsizer-$(VERS).tar.gz + cp $(RPMROOT)/RPMS/noarch/imgsizer-$(VERS)*.noarch.rpm . + diff --git a/README b/README index 6ff75db..1f4685c 100644 --- a/README +++ b/README @@ -13,7 +13,7 @@ Files in this directory: imgsizer.lsm -- Linux Software Map description. Put imgsizer on your execution path and the man page in a man source -directory somewhere. `make install' will do the right hing on a Linux box. +directory somewhere. `make install' will do the right thing on a Linux box. That's it. You will need either identify(1) from the ImageMagick tools or diff --git a/imgsizer b/imgsizer index 6cd8e27..3ee339e 100755 --- a/imgsizer +++ b/imgsizer @@ -55,11 +55,15 @@ # # Incorporated fixes by Peter S. Galbraith. # -# Fixes by EST, 25 April 2003 +# Fixes by ESR, 25 April 2003 # # Merged amended versions of Lennart Poettering's fix for Debian bug 139714. # and Jeroen N. Witmond's fix for Debian bug 168964. Added regression-test # production. +# +# Enhancement by ESR, 14 Nov 2003 +# +# Verify and merge Lucien Saviot's patch to produce XHTML from XHTML input. import sys, os, getopt, string, re, urllib, commands @@ -71,7 +75,7 @@ try: except ImportError: import cmp -version = "2.4, 25 April 2003"; +version = "2.5, 14 November 2003"; splash = """imgsizer version %s, Eric S. Raymond See for updates.""" @@ -104,7 +108,7 @@ def attrformat(xc, dim): res = " " + dim else: res = " " + string.upper(dim) - res = res + '=' + str(xc) + res = res + '="' + str(xc) + '"' return res def sizefix(infp, outfp): @@ -136,8 +140,13 @@ def sizefix(infp, outfp): return if ch == '>': break + if ch == '/': + ch2 = infp.read(1) + ch = ch + ch2 + if ch2 == '>': + break attributes = attributes + ch - outfp.write(transform(attributes) + ">") + outfp.write(transform(attributes) + ch) x_match = re.compile (r" ([0-9]+) *x *([0-9]+)") rdjpg_match = re.compile (r" ([0-9]+)w *\* *([0-9]+)h")