From patchwork Sat Oct 8 16:30:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 679915 X-Patchwork-Delegate: rbryant@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3srsML1vW3z9ryn for ; Sun, 9 Oct 2016 03:30:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b=YgRIQquE; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 08AC010A6F; Sat, 8 Oct 2016 09:30:53 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id E026810A6A for ; Sat, 8 Oct 2016 09:30:51 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 76F414207E7 for ; Sat, 8 Oct 2016 10:30:51 -0600 (MDT) X-ASG-Debug-ID: 1475944250-09eadd732702400001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id j4HwnNUkumEKqkIa (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 08 Oct 2016 10:30:50 -0600 (MDT) X-Barracuda-Envelope-From: stephen@that.guru X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO nov-007-i609.relay.mailchannels.net) (46.232.183.163) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 8 Oct 2016 16:30:49 -0000 Received-SPF: none (mx1-pf2.cudamail.com: domain at that.guru does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 46.232.183.163 X-Barracuda-RBL-IP: 46.232.183.163 X-Sender-Id: mxroute|x-authuser|stephen@that.guru Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 16EFD121497 for ; Sat, 8 Oct 2016 16:30:42 +0000 (UTC) Received: from one.mxroute.com (ip-10-229-2-62.us-west-2.compute.internal [10.229.2.62]) by relay.mailchannels.net (Postfix) with ESMTPA id 8634412148A for ; Sat, 8 Oct 2016 16:30:41 +0000 (UTC) X-Sender-Id: mxroute|x-authuser|stephen@that.guru Received: from one.mxroute.com ([UNAVAILABLE]. [10.28.138.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.8); Sat, 08 Oct 2016 16:30:41 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: mxroute|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: mxroute X-MC-Loop-Signature: 1475944241776:1902520965 X-MC-Ingress-Time: 1475944241775 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Lyx5yvbhOKJtb0omZqTcyrD5GeyV/VLm+veb2dQlVIE=; b=YgRIQquEOJYoqtVmAnpzxGhKo/ CWH2DcDkfRIXfEt94VRSbhIiPAWkTSMUpckFkedGAOOt2TCTBwQFEXb28RulGAH5rEyCqB6SdipOh Q1ZiUi26LNHNRMI7DdwHO0d1sUeqcsbobUvzqi56fgwmC4upNwH82xDz/A2mcF5ZXGRQXce8/acNM 3abYY16Ud6BTVdno+r2v6Mwb47N/zhGlkCHswcsj++gK5XpefdAsolbg6Caw5Do+KApRydVFXeKy0 s37i2L3TWEi5tsw2CI+0q3PAJGy/nJfkHqhIVHU3tWnj3857gECPnSzkjaloDUcFmbYu33I74soui 9iI/hupw==; X-CudaMail-Envelope-Sender: stephen@that.guru From: Stephen Finucane To: dev@openvswitch.org X-CudaMail-MID: CM-E2-1007014301 X-CudaMail-DTE: 100816 X-CudaMail-Originating-IP: 46.232.183.163 Date: Sat, 8 Oct 2016 17:30:23 +0100 X-ASG-Orig-Subj: [##CM-E2-1007014301##][PATCH 1/9] dist-docs: Add support for rST Message-Id: <1475944231-25192-2-git-send-email-stephen@that.guru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475944231-25192-1-git-send-email-stephen@that.guru> References: <1475944231-25192-1-git-send-email-stephen@that.guru> X-AuthUser: stephen@that.guru X-GBUdb-Analysis: 0, 46.232.183.163, Ugly c=0.285716 p=0 Source Normal X-MessageSniffer-Rules: 0-0-0-7506-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1475944250 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 1.10 X-Barracuda-Spam-Status: No, SCORE=1.10 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC0_MV0713, BSF_SC5_MJ1963, DKIM_SIGNED, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33577 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC0_MV0713 Custom rule MV0713 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH 1/9] dist-docs: Add support for rST X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" This will eventually go away once Sphinx starts doing all this work for us. For now, however, let's make sure we don't break the OVS website. This introduces a new dependency for the dist-docs script - 'rst2html'. This tool is packaged on Ubuntu, Fedora (via 'python-docutils'), etc. and can be installed from pip using the 'docsutils' package. Signed-off-by: Stephen Finucane --- Makefile.am | 4 ++-- build-aux/dist-docs | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 49010b3..4b01766 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,8 +63,8 @@ CLEAN_LOCAL = DISTCLEANFILES = PYCOV_CLEAN_FILES = build-aux/check-structs,cover -# A list of Markdown-formatted documentation that will automatically be -# included in the "make dist-docs" output. +# A list of Markdown- or reStructuredText-formatted documentation that will +# automatically be included in the "make dist-docs" output. docs = \ CONTRIBUTING.md \ CodingStyle.md \ diff --git a/build-aux/dist-docs b/build-aux/dist-docs index a81e4b2..677ceeb 100755 --- a/build-aux/dist-docs +++ b/build-aux/dist-docs @@ -35,6 +35,7 @@ search_path () { } search_path man search_path markdown +search_path rst2html search_path ps2pdf # Create dist-docs directory. @@ -61,9 +62,9 @@ cat >&3 < EOF -# Add top-level documentation to index.html, giving it .txt extensions so -# that the webserver doesn't serve it as Markdown and make your web browser -# try to invoke some kind of external helper you don't have installed. +# Add top-level documentation to index.html, giving it .txt extensions so that +# the webserver doesn't serve it as Markdown/rST and make your web browser try +# to invoke some kind of external helper you don't have installed. # # Also translate documentation to HTML. for file @@ -92,6 +93,21 @@ EOF EOF ;; + *.rst) + cp "$srcdir/$file" "$distdir/$file.txt" + ln -s $(basename "$file.txt") "$distdir/$file" + rst2html "$distdir/$file.txt" --stylesheet-path="style.css" \ + --link-stylesheet --title="$file (Open vSwitch $VERSION)" \ + > "$distdir/$file.html" + cat < + $file + $title + HTML, plain text + +EOF + ;; + *) cp "$srcdir/$file" "$distdir/$file" cat <