Merge lp:~dpm/ubuntu-docs/html-fix-urls into lp:ubuntu-docs/precise

Proposed by David Planella
Status: Merged
Merged at revision: 115
Proposed branch: lp:~dpm/ubuntu-docs/html-fix-urls
Merge into: lp:ubuntu-docs/precise
Diff against target: 51 lines (+29/-0)
2 files modified
html/Makefile (+4/-0)
html/fix-urls.sed (+25/-0)
To merge this branch: bzr merge lp:~dpm/ubuntu-docs/html-fix-urls
Reviewer Review Type Date Requested Status
Ubuntu Documentation Committers Pending
Review via email: mp+99844@code.launchpad.net

Description of the change

This is a follow-up to a previous merge proposal [1], the purpose of which is to fix the ghelp links in the generated HTML output and convert them to HTTP URLs.

[1] https://code.launchpad.net/~dpm/ubuntu-docs/html-multiple-locale-output/+merge/99495

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'html/Makefile'
2--- html/Makefile 2012-03-28 06:33:01 +0000
3+++ html/Makefile 2012-03-28 23:47:04 +0000
4@@ -24,6 +24,7 @@
5 SRCDIR=../ubuntu-help
6 SED=/bin/sed
7 INSTALLDIR=/var/www/
8+URLFIXER=fix-urls.sed
9
10 # Space-separated list of language codes for documents. HTML will only be
11 # built for those codes in the list
12@@ -63,6 +64,9 @@
13 -e "s/<html>/<html lang="$$lang">/" \
14 -e 's|/usr/share/icons/.*/\(.*\.svg\)|img/\1|'\
15 "$(HTMLDESTDIR)/$$lang/"*.html; \
16+ $(SED) -i -f "$(URLFIXER)" "$(HTMLDESTDIR)/$$lang/"*.html; \
17+ echo "\nSearching for unfixed ghelp links:"; \
18+ grep "href=\"ghelp:" "$(HTMLDESTDIR)/$$lang/"*.html; \
19 rm -rf "$(HTMLDESTDIR)/$$lang/usr"; \
20 done
21
22
23=== added file 'html/fix-urls.sed'
24--- html/fix-urls.sed 1970-01-01 00:00:00 +0000
25+++ html/fix-urls.sed 2012-03-28 23:47:04 +0000
26@@ -0,0 +1,25 @@
27+#!/bin/sed -f
28+
29+####################################################################################
30+# Copyright (C) 2005-2006 Ubuntu Documentation Project (ubuntu-doc@lists.ubuntu.com)
31+# This program is free software; you can redistribute it and/or modify
32+# it under the terms of the GNU General Public License as published by
33+# the Free Software Foundation; either version 2 of the License, or
34+# (at your option) any later version.
35+#
36+# This program is distributed in the hope that it will be useful,
37+# but WITHOUT ANY WARRANTY; without even the implied warranty of
38+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39+# GNU General Public License for more details.
40+#
41+# You should have received a copy of the GNU General Public License
42+# along with this program; if not, write to the Free Software
43+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
44+# On Debian based systems a copy of the GPL can be found
45+# at /usr/share/common-licenses/GPL
46+####################################################################################
47+
48+## Fix ghelp links in the generated HTML documentation
49+
50+s#ghelp:\(orca\|cheese\|baobab\|brasero\|gucharmap\)#http://library\.gnome\.org/users/\1/3\.4/#g
51+s#ghelp:synaptic#https://help\.ubuntu\.com/community/SynapticHowto#g

Subscribers

People subscribed via source and target branches