[SCM] live-manual branch, debian, updated. debian/2.0.0-1-7-g9991212

Ben Armstrong synrg at debian.org
Thu Dec 16 12:39:09 UTC 2010


The following commit has been merged in the debian branch:
commit 999121265e12dc4b2ce87414553ef013063669a5
Author: Ben Armstrong <synrg at debian.org>
Date:   Thu Dec 16 08:38:58 2010 -0400

    Adding cleanup of sisu output mode to strip nav bars.

diff --git a/Makefile b/Makefile
index 2ca79ca..e9a4fbf 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ SHELL := sh -e
 
 LANGUAGES = en $(shell cd manual/po && ls)
 
+DEBUG = 0
+
 all: test build
 
 test:
@@ -31,6 +33,11 @@ build:
 		cd $(CURDIR)/manual/$${LANGUAGE}; \
 		sisu-epub -v live-manual.ssm; \
 		sisu-html -v live-manual.ssm; \
+		for FILE in build/$${LANGUAGE}/live-manual/*.html; \
+		do \
+			../bin/fix-sisu-html.rb $${FILE}; \
+			([ $(DEBUG) -gt 0 ] || rm -f $${FILE}~); \
+		done; \
 		sisu-odf -v live-manual.ssm; \
 		sisu-pdf -v live-manual.ssm; \
 		sisu-txt -v live-manual.ssm; \
diff --git a/debian/control b/debian/control
index 915fcf2..8e885d8 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: doc
 Priority: optional
 Maintainer: Debian Live Project <debian-live at lists.debian.org>
 Uploaders: Chris Lamb <lamby at debian.org>, Daniel Baumann <daniel at debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
+Build-Depends: debhelper (>= 7.0.50~), ruby, libnokogiri-ruby
 Build-Depends-Indep: sisu-complete (>= 2.7.9), po4a
 Standards-Version: 3.9.1
 Homepage: http://live.debian.net/devel/live-manual/
diff --git a/manual/bin/fix-sisu-html.rb b/manual/bin/fix-sisu-html.rb
new file mode 100755
index 0000000..a5b4a9b
--- /dev/null
+++ b/manual/bin/fix-sisu-html.rb
@@ -0,0 +1,15 @@
+#! /usr/bin/env ruby
+
+require 'nokogiri'
+
+output_file=ARGV.shift
+input_file=output_file+"~"
+
+File.rename(output_file,input_file)
+File.open(output_file,"w") do |o|
+    doc=Nokogiri::HTML(open input_file)
+    # CSS3 selectors don't support regexes, so this is a bit simplistic.
+    # Change to use a custom pseudo class if anything more complex is needed.
+    doc.css(%[table[summary~="segment"]]).remove
+    o.puts doc.to_html
+end

-- 
live-manual



More information about the debian-live-changes mailing list