[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r10294 - /man-cgi/static-repository/www/



Author: jfs
Date: Wed Oct 30 01:42:11 2013
New Revision: 10294

URL: http://svn.debian.org/wsvn/?sc=1&rev=10294
Log:
Add HTML code for static repository based on Ubuntu's Manpage engine

Added:
    man-cgi/static-repository/www/
    man-cgi/static-repository/www/.htaccess
    man-cgi/static-repository/www/above.html
    man-cgi/static-repository/www/above1.html
    man-cgi/static-repository/www/above2.html
    man-cgi/static-repository/www/below.html
    man-cgi/static-repository/www/debian-manpage-search.src
    man-cgi/static-repository/www/debian-manpage-search.xml
    man-cgi/static-repository/www/functions.js
    man-cgi/static-repository/www/index_static.html
    man-cgi/static-repository/www/index_static_includes.html
    man-cgi/static-repository/www/manpages.css
    man-cgi/static-repository/www/not_found.html
    man-cgi/static-repository/www/not_found_includes.html

Added: man-cgi/static-repository/www/.htaccess
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/.htaccess?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/.htaccess	(added)
+++ man-cgi/static-repository/www/.htaccess	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,9 @@
+ErrorDocument 404 /static/not_found.html
+Options Indexes FollowSymLinks MultiViews ExecCGI Includes
+IndexOptions FancyIndexing IgnoreCase VersionSort SuppressHTMLPreamble SuppressDescription SuppressSize SuppressLastModified
+DirectoryIndex "index_static.html"
+HeaderName /static/above.html
+ReadmeName /static/below.html
+AddType text/html .html
+AddOutputFilter INCLUDES .html 
+#CheckSpelling On

Added: man-cgi/static-repository/www/above.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/above.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/above.html	(added)
+++ man-cgi/static-repository/www/above.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,3 @@
+<!--#include virtual="/above1.html" -->
+Directory Listing
+<!--#include virtual="/above2.html" -->

Added: man-cgi/static-repository/www/above1.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/above1.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/above1.html	(added)
+++ man-cgi/static-repository/www/above1.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr">
+    <head profile="http://a9.com/-/spec/opensearch/1.1/";>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <link rel="search"
+            type="application/opensearchdescription+xml"
+            href="/debian-manpage-search.xml"
+            title="Debian Manpage Search" />
+        <title>Debian Manpage:

Added: man-cgi/static-repository/www/above2.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/above2.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/above2.html	(added)
+++ man-cgi/static-repository/www/above2.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,25 @@
+</title>
+        <link rel="stylesheet" type="text/css" href="http://www.debian.org/debian.css"/>
+        <link rel="stylesheet" type="text/css" href="/static/manpages.css"/>
+        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+        <script language="JavaScript" src="/static/functions.js"></script>
+    </head>
+    <body>
+        <div id="container">
+            <div id="container-inner">
+                <div id="header">
+                    <h1><a href="/">Debian manpages</a></h1>
+                </div>
+                <div id="subheader">
+                    <div id="subheader-search">
+                        <form method="get" action="/cgi-bin/man.cgi">
+			Man Page or Keyword Search: <input type="text" name="query" tabindex="1" id="search-box-input" />
+                        </form>
+                    </div>
+                    <div class="subheader-menu">
+                        <script>navbar();</script>
+                    </div>
+                </div>
+                <div id="content" class="clearfix content-area">
+                    <div class="level-4-nav" id="toc"></div>
+                    <script>distroAndSection();</script>

Added: man-cgi/static-repository/www/below.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/below.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/below.html	(added)
+++ man-cgi/static-repository/www/below.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,13 @@
+
+                </div>
+            </div>
+            <div id="copyright">
+                <p>
+                Powered by the <a href="https://launchpad.net/ubuntu-manpage-repository";>Ubuntu Manpage Repository</a> generator
+                maintained by <a href="http://blog.dustinkirkland.com/";>Dustin Kirkland</a><br />
+                &copy; 2010 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
+                </p>
+            </div>
+        </div>
+    </body>
+</html>

Added: man-cgi/static-repository/www/debian-manpage-search.src
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/debian-manpage-search.src?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/debian-manpage-search.src	(added)
+++ man-cgi/static-repository/www/debian-manpage-search.src	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,10 @@
+<search
+ name="Debian Manpages"
+ method="GET"
+ action="http://manpages.debian.org/cgi-bin/man.cgi";
+ queryCharset="utf-8"
+>
+
+  <input name="title" user>
+</search>
+

Added: man-cgi/static-repository/www/debian-manpage-search.xml
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/debian-manpage-search.xml?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/debian-manpage-search.xml	(added)
+++ man-cgi/static-repository/www/debian-manpage-search.xml	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,10 @@
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/";
+                       xmlns:moz="http://www.mozilla.org/2006/browser/search/";>
+<ShortName>Debian Manpage Search</ShortName>
+<Description>Search the complete repository of all manpages (manuals) included in Debian</Description>
+<InputEncoding>utf-8</InputEncoding>
+<Url type="text/html" method="get" template="http://manpages.debian.org/cgi-bin/man.cgi";>
+  <Param name="query" value="{searchTerms}"/>
+</Url>
+<moz:SearchForm>http://manpages.debian.org/cgi-bin/man.cgi</moz:SearchForm>
+</OpenSearchDescription>

Added: man-cgi/static-repository/www/functions.js
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/functions.js?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/functions.js	(added)
+++ man-cgi/static-repository/www/functions.js	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,223 @@
+// This is the Ubuntu manpage repository generator and interface.
+//
+// Copyright (C) 2008 Canonical Ltd.
+//
+// This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,
+// based on a framework by Kees Cook <kees@ubuntu.com>.
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+// On Debian-based systems, the complete text of the GNU General Public
+// License can be found in /usr/share/common-licenses/GPL-3
+
+function langSelect() {
+    var regexS = "[\\?&]lr=([^&#]*)";
+    var regex = new RegExp( regexS );
+    var lang_val = regex.exec( window.location.href );
+    document.write("<select name=lr>");
+    lang = new Array();
+    val = new Array();
+    i = 0;
+    lang[i] = "en"; val[i++] = "en";
+    lang[i] = "cn"; val[i++] = "zh-CN";
+    lang[i] = "cs"; val[i++] = "cs";
+    lang[i] = "de"; val[i++] = "de";
+    lang[i] = "es"; val[i++] = "es";
+    lang[i] = "fr"; val[i++] = "fr";
+    lang[i] = "hu"; val[i++] = "hu";
+    lang[i] = "it"; val[i++] = "it";
+    lang[i] = "ja"; val[i++] = "ja";
+    lang[i] = "ko"; val[i++] = "ko";
+    lang[i] = "nl"; val[i++] = "nl";
+    lang[i] = "pl"; val[i++] = "pl";
+    lang[i] = "pt"; val[i++] = "pt";
+    lang[i] = "ru"; val[i++] = "ru";
+    lang[i] = "sv"; val[i++] = "sv";
+    lang[i] = "tr"; val[i++] = "tr";
+    lang[i] = "tw"; val[i++] = "zh-TW";
+    var selected = 0;
+    for (j=0; j<i; j++) {
+        if (lang_val != null && lang_val[1] == 'lang_' + val[j]) {
+            selected = j;
+        }
+        document.write("<option value='lang_" + val[j] + "'>" + lang[j] + "</option>");
+    }
+    document.write("</select>");
+    document.forms[0].lr.selectedIndex = selected;
+}
+
+function distroAndSection() {
+    var parts = location.href.split("/");
+    if (parts.length < 5) {
+        return;
+    }
+    var distro = parts[4];
+    var section = parts[5];
+    section = section.replace(/^man/, "");
+    if (!(section >= 1 && section <= 9)) {
+        section = parts[6];
+        section = section.replace(/^man/, "");
+        var lang = parts[5];
+    }
+    if (distro.length > 0) {
+        document.write("<a href=\"../\">" + distro + "</a> ");
+        if (section.length > 0) {
+            document.write("(<a href=\"../man" + section + "\">" + section + "</a>) ");
+        }
+    }
+    var gz_href = location.href.replace(/\/manpages\//, "\/manpages.gz\/");
+    gz_href = gz_href.replace(/\/en\//, "\/");
+    gz_href = gz_href.replace(/\.html$/, "\.gz");
+    var gz = gz_href.replace(/^.*\//, "");
+    document.write("<a href=\"" + gz_href + "\">" + gz + "</a><br>");
+}
+
+function highlight(word) {
+        if (location.href.match("/" + word)) {
+                return("current");
+        } else {
+                return("plain");
+        }
+}
+function navbar() {
+        document.write("<ul>");
+        versions = new Array();
+        versions.push({"name":"sid", "number":"unstable"});
+        versions.push({"name":"jessie", "number":"testing"});
+        versions.push({"name":"wheezy", "number":"7.0 (stable)"});
+        for (var i=0; i<versions.length; i++) {
+            if (location.href.match("\.html$")) {
+            href = location.href;
+            href = href.replace(/\/manpages\/[^\/]*/, "/manpages/" + versions[i]["name"]);
+	    document.write("<a href=\"" + href + "\">" + versions[i]["number"] + "</a> | ");
+        } else {
+                    document.write("<a href=\"/manpages/" + versions[i]["name"] + "\">" + versions[i]["number"] + "</a> |");
+        }
+        }
+        document.write("<a href=\"javascript:printManpage()\"><img src=/img/printer.png></a>");
+        document.write("</ul>");
+}
+
+// See: http://developer.mozilla.org/en/docs/Adding_search_engines_from_web_pages
+function installSearchEngine() {
+    if (window.external && ("AddSearchProvider" in window.external)) {
+        // Firefox 2 and IE 7, OpenSearch
+        window.external.AddSearchProvider("http://manpages.debian.org/debian-manpage-search.xml";);
+    } else if (window.sidebar && ("addSearchEngine" in window.sidebar)) {
+        // Firefox <= 1.5, Sherlock
+        window.sidebar.addSearchEngine("http://http://manpages.debian.org/debian-manpage-search.src";,
+        "http://manpages.debian.org/debian-manpage-search.png";,
+        "Debian Manpages", "");
+    } else {
+        // No search engine support (IE 6, Opera, etc).
+        alert("No search engine plugin support is available for this browser");
+    }
+}
+
+function getWidth() {
+    width = 0;
+    if (parseInt(navigator.appVersion)>3) {
+        if (navigator.appName=="Netscape") {
+            width = window.innerWidth;
+        } else if (navigator.appName.indexOf("Microsoft")!=-1) {
+            width = document.body.offsetWidth;
+        }
+    }
+    return width;
+}
+
+function printManpage() {
+    var disp_setting="toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=yes,width=600,height=400";
+    var content = document.getElementById("content").innerHTML;
+    var docprint = window.open("","",disp_setting);
+    docprint.document.open();
+    docprint.document.write('<html><head><title>Debian Manpages Static Repository</title></head><body onLoad="self.print()">');
+    docprint.document.write(content);
+    docprint.document.write('<body></html>');
+    docprint.document.close();
+    docprint.focus();
+}
+
+
+
+
+//////////////////////////////////
+// This script was written By Brady Mulhollem - WebTech101.com
+// http://www.webtech101.com/Javascript/toc-generator
+
+window.onload = function(){if (getWidth() > 790) { new tocGen('content','toc')}};
+
+function tocGen(id,writeTo){
+    this.id = id;
+    this.num = 0;
+    this.opened = 0;
+    this.writeOut = '';
+    this.previous = 0;
+    if(document.getElementById){
+        //current requirements;
+        this.parentOb = document.getElementById(id);
+        var headers = this.getHeaders(this.parentOb);
+        if(headers.length > 0){
+            this.writeOut += '<ul>';
+            var num;
+            for(var i=0;i<headers.length;i++){
+                num = headers[i].nodeName.substr(1);
+                if(num > this.previous){
+                    this.writeOut += '<ul>';
+                    this.opened++;
+                    this.addLink(headers[i]);
+                }
+                else if(num < this.previous){
+                    for(var j=0;j<this.opened;j++){
+                        this.writeOut += '<\/li><\/ul>';
+                        this.opened--;
+                    }
+                    this.addLink(headers[i]);
+                }
+                else{
+                    this.writeout += '<\/li>';
+                    this.addLink(headers[i]);
+                }
+                this.previous = num;
+            }
+            for(var j=0;j<=this.opened;j++){
+                this.writeOut += '<\/li><\/ul>';
+            }
+            document.getElementById(writeTo).innerHTML = this.writeOut;
+        }
+    }
+}
+tocGen.prototype.addLink = function(ob){
+    var id = this.getId(ob);
+    var link = '<li><a href="#'+id+'">'+ob.innerHTML.toLowerCase()+'<\/a>';
+    this.writeOut += link;
+}
+tocGen.prototype.getId = function(ob){
+    if(!ob.id){
+        ob.id = this.id+'toc'+this.num;
+        this.num++;
+    }
+    return ob.id;
+}
+tocGen.prototype.getHeaders = function(parent){
+    var return_array = new Array();
+    var pat = new RegExp("H[3-6]");
+    for(var i=0;i<parent.childNodes.length;i++){
+        if(pat.test(parent.childNodes[i].nodeName)){
+            return_array[return_array.length] = parent.childNodes[i];
+        }
+    }
+    return return_array;
+}
+/////////////////////////////////////////////////////////////////////////////////////

Added: man-cgi/static-repository/www/index_static.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/index_static.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/index_static.html	(added)
+++ man-cgi/static-repository/www/index_static.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr">
+    <head profile="http://a9.com/-/spec/opensearch/1.1/";>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <link rel="search"
+            type="application/opensearchdescription+xml"
+            href="/debian-manpage-search.xml"
+            title="Debian Manpage Static Repository" />
+        <title>Debian Manpage: Welcome
+
+</title>
+        <link rel="stylesheet" type="text/css" href="http://www.debian.org/debian.css"/>
+        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+        <script language="JavaScript" src="functions.js"></script>
+    </head>
+    <body>
+        <div id="container">
+            <div id="container-inner">
+                <div id="header">
+                    <h1><a href="/">Debian manpages</a></h1>
+                </div>
+                <div id="subheader">
+                    <div id="subheader-search">
+			<form method="get" action="/cgi-bin/man.cgi">
+			Man Page or Keyword Search: <input type="text" name="query" tabindex="1"/>
+                        </form>
+                    </div>
+                    <div class="subheader-menu">
+                        <script>navbar();</script>
+                    </div>
+                </div>
+                <div id="content" class="clearfix content-area">
+                    <div class="level-4-nav" id="toc"></div>
+                    <script>distroAndSection();</script>
+
+    <h2>Welcome to the Debian Manpage (Static) Repository</h2>
+    <p>This site contains hundreds of thousands of dynamically generated manuals, extracted from every package of every supported version of Debian, and updated on a daily basis.  Traditionally, <a href=http://en.wikipedia.org/wiki/Manpage>manpages</a> are browsed on the command line.  This project renders all such manuals included in the Debian distribution into an HTML, web-browsable format.</p>
+    <h2>Navigating the Repository</h2>
+    <ul>
+      <li><a href=/manpages/>Browse the repository</a> as a hierarchical file structure</li>
+      <li><a href=/cgi-bin/man.cgi>Use the search form</a> at the top of every page</li>
+<!--      <li><a href=javascript:installSearchEngine()>Install the search engine plugin</a> for your browser</li> -->
+<!--       <li><a href=dman>Download the 'dman' shell script</a> to run on a command line</li> -->
+    </ul>
+    <h2>Other Resources</h2>
+    <p>You may also find the following Debian documentation resources useful:</p>
+    <ul>
+      <li><a href=http://www.debian.org/doc/>Official Documentation</a> maintained by the Debian Documentation Team</li>
+      <li><a href=http://wiki.debian.org/>Documentation</a> maintained by the Debian Community</li>
+    </ul>
+
+
+                </div>
+            </div>
+            <div id="copyright">
+                <p>
+                Powered by the <a href="https://launchpad.net/ubuntu-manpage-repository";>Ubuntu Manpage Repository</a> generator
+                maintained by <a href="http://blog.dustinkirkland.com/";>Dustin Kirkland</a><br />
+                &copy; 2010 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
+                </p>
+            </div>
+        </div>
+    </body>
+</html>

Added: man-cgi/static-repository/www/index_static_includes.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/index_static_includes.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/index_static_includes.html	(added)
+++ man-cgi/static-repository/www/index_static_includes.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,20 @@
+<!--#include virtual="/static/above1.html" -->
+Welcome
+<!--#include virtual="/static/above2.html" -->
+
+    <h2>Welcome to the Debian Manpage Repository</h2>
+    <p>This site contains hundreds of thousands of dynamically generated manuals, extracted from every package of every supported version of Debian, and updated on a daily basis.  Traditionally, <a href=http://en.wikipedia.org/wiki/Manpage>manpages</a> are browsed on the command line.  This project renders all such manuals included in the Debian distribution into an HTML, web-browsable format.</p>
+    <h2>Navigating the Repository</h2>
+    <ul>
+      <li><a href=/manpages/>Browse the repository</a> as a hierarchical file structure</li>
+      <li><a href=/cgi-bin/man.cgi>Use the search form</a> at the top of every page</li>
+<!--      <li><a href=javascript:installSearchEngine()>Install the search engine plugin</a> for your browser</li> -->
+<!--       <li><a href=dman>Download the 'dman' shell script</a> to run on a command line</li> -->
+    </ul>
+    <h2>Other Resources</h2>
+    <p>You may also find the following Debian documentation resources useful:</p>
+    <ul>
+      <li><a href=http://www.debian.org/doc/>Official Documentation</a> maintained by the Debian Documentation Team</li>
+      <li><a href=http://wiki.debian.org/>Documentation</a> maintained by the Debian Community</li>
+    </ul>
+<!--#include virtual="/static/below.html" -->

Added: man-cgi/static-repository/www/manpages.css
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/manpages.css?rev=10294&op=file
==============================================================================
    (empty)

Added: man-cgi/static-repository/www/not_found.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/not_found.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/not_found.html	(added)
+++ man-cgi/static-repository/www/not_found.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr">
+    <head profile="http://a9.com/-/spec/opensearch/1.1/";>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <link rel="search"
+            type="application/opensearchdescription+xml"
+            href="/debian-manpage-search.xml"
+            title="Debian Manpage Search" />
+        <title>Debian Manpage: Not Found
+</title>
+        <link rel="stylesheet" type="text/css" href="http://www.debian.org/debian.css"/>
+        <link rel="stylesheet" type="text/css" href="/static/manpages.css"/>
+        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+        <script language="JavaScript" src="/static/functions.js"></script>
+    </head>
+    <body>
+
+<script language="JavaScript">
+  var q = location.href;
+  if (q.search(/\/manpages\/.*\/man[0-9]\/.*[^0-9]\.html$/) >= 0) {
+    // Current location matches a legacy link, with just a plain .html filename
+    // Try to redirect to the new location, which has a .[0-9].html filename
+    location.replace(q.replace(/\/man([0-9])\/(.*)\.html/, "/man$1/$2.$1.html"));
+  } else {
+    // Try redirecting to a page of search results
+    q = q.replace(/.*\//, "");
+    q = q.replace(/\.html$/, "");
+    location.replace('/cgi-bin/man.cgi?&query=' + q);
+  }
+</script>
+
+        <div id="container">
+            <div id="container-inner">
+                <div id="header">
+                    <h1><a href="/">Debian manpages</a></h1>
+                </div>
+                <div id="subheader">
+                    <div id="subheader-search">
+                        <form method="get" action="/cgi-bin/man.cgi">
+			Man Page or Keyword Search: <input type="text" name="query" tabindex="1" id="search-box-input" />
+                        </form>
+                    </div>
+                    <div class="subheader-menu">
+                        <script>navbar();</script>
+                    </div>
+                </div>
+                <div id="content" class="clearfix content-area">
+                    <div class="level-4-nav" id="toc"></div>
+                    <script>distroAndSection();</script>
+
+<br><big><big><strong>We could not find that page</strong></big></big><br><br>
+We will try to redirect you to some related material.
+
+
+                </div>
+            </div>
+            <div id="copyright">
+                <p>
+                Powered by the <a href="https://launchpad.net/ubuntu-manpage-repository";>Ubuntu Manpage Repository</a> generator
+                maintained by <a href="http://blog.dustinkirkland.com/";>Dustin Kirkland</a><br />
+                &copy; 2010 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
+                </p>
+            </div>
+        </div>
+    </body>
+</html>

Added: man-cgi/static-repository/www/not_found_includes.html
URL: http://svn.debian.org/wsvn/man-cgi/static-repository/www/not_found_includes.html?rev=10294&op=file
==============================================================================
--- man-cgi/static-repository/www/not_found_includes.html	(added)
+++ man-cgi/static-repository/www/not_found_includes.html	Wed Oct 30 01:42:11 2013
@@ -0,0 +1,20 @@
+<script language="JavaScript">
+  var q = location.href;
+  if (q.search(/\/manpages\/.*\/man[0-9]\/.*[^0-9]\.html$/) >= 0) {
+    // Current location matches a legacy link, with just a plain .html filename
+    // Try to redirect to the new location, which has a .[0-9].html filename
+    location.replace(q.replace(/\/man([0-9])\/(.*)\.html/, "/man$1/$2.$1.html"));
+  } else {
+    // Try redirecting to a page of search results
+    q = q.replace(/.*\//, "");
+    q = q.replace(/\.html$/, "");
+    location.replace('/cgi-bin/man.cgi?&query=' + q);
+  }
+</script>
+
+<!--#include virtual="/above1.html" -->
+Not Found
+<!--#include virtual="/above2.html" -->
+<br><big><big><strong>We could not find that page</strong></big></big><br><br>
+We will try to redirect you to some related material.
+<!--#include virtual="/below.html" -->


Reply to: