[Python-modules-commits] r18493 - in packages/python-docutils/trunk/debian (changelog rules)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sat Sep 10 21:11:40 UTC 2011


    Date: Saturday, September 10, 2011 @ 21:11:38
  Author: jwilk
Revision: 18493

Don't embed images on remote servers.

Modified:
  packages/python-docutils/trunk/debian/changelog
  packages/python-docutils/trunk/debian/rules

Modified: packages/python-docutils/trunk/debian/changelog
===================================================================
--- packages/python-docutils/trunk/debian/changelog	2011-09-10 20:29:37 UTC (rev 18492)
+++ packages/python-docutils/trunk/debian/changelog	2011-09-10 21:11:38 UTC (rev 18493)
@@ -1,10 +1,11 @@
 python-docutils (0.8.1-2) UNRELEASED; urgency=low
 
-  * Install CSS files to the -doc package. Correct paths to them in the *.html
-    files.
-  * Don't compress *.txt files in the -doc package.
+  * Improve the -doc package:
+    + Install CSS files. Correct paths to them in the *.html files.
+    + Don't compress *.txt files in the -doc package.
+    + Don't embed images on remote servers.
 
- -- Jakub Wilk <jwilk at debian.org>  Sat, 10 Sep 2011 22:09:54 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Sat, 10 Sep 2011 23:10:36 +0200
 
 python-docutils (0.8.1-1) experimental; urgency=low
 

Modified: packages/python-docutils/trunk/debian/rules
===================================================================
--- packages/python-docutils/trunk/debian/rules	2011-09-10 20:29:37 UTC (rev 18492)
+++ packages/python-docutils/trunk/debian/rules	2011-09-10 21:11:38 UTC (rev 18493)
@@ -27,6 +27,11 @@
 BUILDHTML_DIRS := .
 BUILDHTML_RECURSE_DIRS := docs
 
+pre_localize_css = 's,href="(([.][.]/)*)docutils/.*/([^/]+[.]css)",href="$$1css/$$3",g;'
+pre_strip_images1 = 's,<img src="http://[^"]+" alt="([^"]*)"[^>]*>,$$1,g;'
+pre_strip_images2 = 's,<img alt="([^"]*)"[^>]*\bsrc="http://[^"]+"[^>]*>,$$1,g;'
+pre_strip_images = $(pre_strip_images1)$(pre_strip_images2)
+
 build build-indep: build-stamp
 build-stamp:
 	dh_testdir
@@ -65,7 +70,8 @@
 		PYTHONPATH=.:extras $(PYTHON) tools/buildhtml.py \
 			--link-stylesheet $$dir --traceback; \
 	done
-	( ls *.html && find docs/ -name '*.html' ) | xargs sed -i -r -e 's,href="(([.][.]/)*)docutils/.*/([^/]+[.]css)",href="\1css/\3",'
+	( ls *.html && find docs/ -name '*.html' ) \
+	| xargs perl -0777 -p -i -e $(pre_localize_css)$(pre_strip_images)
 	touch build-stamp
 
 clean:




More information about the Python-modules-commits mailing list