From patchwork Fri Jan 30 18:13:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John McNamara X-Patchwork-Id: 2853 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 6917A5AA0; Fri, 30 Jan 2015 19:14:03 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C31772E8D for ; Fri, 30 Jan 2015 19:13:44 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 30 Jan 2015 10:13:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,492,1418112000"; d="scan'208";a="520342763" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 30 Jan 2015 10:06:22 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t0UIDdHq000940; Fri, 30 Jan 2015 18:13:40 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t0UIDdeM008574; Fri, 30 Jan 2015 18:13:39 GMT Received: (from jmcnam2x@localhost) by sivswdev02.ir.intel.com with id t0UIDdgL008570; Fri, 30 Jan 2015 18:13:39 GMT From: John McNamara To: dev@dpdk.org Date: Fri, 30 Jan 2015 18:13:26 +0000 Message-Id: <1422641608-8514-3-git-send-email-john.mcnamara@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1422641608-8514-1-git-send-email-john.mcnamara@intel.com> References: <1421255657-19521-1-git-send-email-john.mcnamara@intel.com> <1422641608-8514-1-git-send-email-john.mcnamara@intel.com> Subject: [dpdk-dev] [PATCH v2 2/4] doc: Add Sphinx config to build pdf version of guides X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add Python Sphinx config to allow conversion of guides to PDF format. Signed-off-by: John McNamara --- doc/guides/conf.py | 51 ++++++++++++++++++++++++++++++++++--- doc/guides/freebsd_gsg/conf.py | 41 +++++++++++++++++++++++++++++ doc/guides/linux_gsg/conf.py | 41 +++++++++++++++++++++++++++++ doc/guides/prog_guide/conf.py | 41 +++++++++++++++++++++++++++++ doc/guides/rel_notes/conf.py | 41 +++++++++++++++++++++++++++++ doc/guides/sample_app_ug/conf.py | 41 +++++++++++++++++++++++++++++ doc/guides/testpmd_app_ug/conf.py | 41 +++++++++++++++++++++++++++++ 7 files changed, 293 insertions(+), 4 deletions(-) create mode 100644 doc/guides/freebsd_gsg/conf.py create mode 100644 doc/guides/linux_gsg/conf.py create mode 100644 doc/guides/prog_guide/conf.py create mode 100644 doc/guides/rel_notes/conf.py create mode 100644 doc/guides/sample_app_ug/conf.py create mode 100644 doc/guides/testpmd_app_ug/conf.py diff --git a/doc/guides/conf.py b/doc/guides/conf.py index 385af03..71253c5 100644 --- a/doc/guides/conf.py +++ b/doc/guides/conf.py @@ -28,12 +28,55 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import subprocess +from subprocess import check_output +from sphinx.highlighting import PygmentsBridge +from pygments.formatters.latex import LatexFormatter project = 'DPDK' - copyright = '2014, Intel' +master_doc = 'index' -version = subprocess.check_output(["make","-sRrC","../../", "showversion"]) -master_doc = 'index' +# Configuration for latex/pdf files. +latex_preamble = r""" +\usepackage[utf8]{inputenc} +\usepackage{DejaVuSansMono} +\usepackage[T1]{fontenc} +\usepackage{helvet} +\renewcommand{\familydefault}{\sfdefault} + +\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{xleftmargin=5mm} +""" + +latex_elements = { + 'papersize': 'a4paper', + 'pointsize': '11pt', + 'preamble': latex_preamble} + +latex_documents = [ + ('index', + 'dpdk_docs.tex', + '', + '', + 'manual')] + +texinfo_documents = [ + ('index', + '', + '', + '', + '', + '', + 'Miscellaneous')] + + +# Override the dafault Latex formatter. +class CustomLatexFormatter(LatexFormatter): + + def __init__(self, **options): + + super(CustomLatexFormatter, self).__init__(**options) + + self.verboptions = r"formatcom=\footnotesize" + +PygmentsBridge.latex_formatter = CustomLatexFormatter diff --git a/doc/guides/freebsd_gsg/conf.py b/doc/guides/freebsd_gsg/conf.py new file mode 100644 index 0000000..fd97d69 --- /dev/null +++ b/doc/guides/freebsd_gsg/conf.py @@ -0,0 +1,41 @@ +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +execfile('../conf.py') + +release = check_output(['make', '-sRrC', '../../../', 'showversion']) + +# Overide the latex_documents to change the output name. +latex_documents = [ + ('index', + 'dpdk_freebsd_getting_started_guide.tex', + '', + '', + 'manual')] diff --git a/doc/guides/linux_gsg/conf.py b/doc/guides/linux_gsg/conf.py new file mode 100644 index 0000000..8086763 --- /dev/null +++ b/doc/guides/linux_gsg/conf.py @@ -0,0 +1,41 @@ +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +execfile('../conf.py') + +release = check_output(['make', '-sRrC', '../../../', 'showversion']) + +# Overide the latex_documents to change the output name. +latex_documents = [ + ('index', + 'dpdk_linux_getting_started_guide.tex', + '', + '', + 'manual')] diff --git a/doc/guides/prog_guide/conf.py b/doc/guides/prog_guide/conf.py new file mode 100644 index 0000000..6a9e74c --- /dev/null +++ b/doc/guides/prog_guide/conf.py @@ -0,0 +1,41 @@ +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +execfile('../conf.py') + +release = check_output(['make', '-sRrC', '../../../', 'showversion']) + +# Overide the latex_documents to change the output name. +latex_documents = [ + ('index', + 'dpdk_programmers_guide.tex', + '', + '', + 'manual')] diff --git a/doc/guides/rel_notes/conf.py b/doc/guides/rel_notes/conf.py new file mode 100644 index 0000000..9ddf4c2 --- /dev/null +++ b/doc/guides/rel_notes/conf.py @@ -0,0 +1,41 @@ +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +execfile('../conf.py') + +release = check_output(['make', '-sRrC', '../../../', 'showversion']) + +# Overide the latex_documents to change the output name. +latex_documents = [ + ('index', + 'dpdk_release_notes.tex', + '', + '', + 'manual')] diff --git a/doc/guides/sample_app_ug/conf.py b/doc/guides/sample_app_ug/conf.py new file mode 100644 index 0000000..def3132 --- /dev/null +++ b/doc/guides/sample_app_ug/conf.py @@ -0,0 +1,41 @@ +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +execfile('../conf.py') + +release = check_output(['make', '-sRrC', '../../../', 'showversion']) + +# Overide the latex_documents to change the output name. +latex_documents = [ + ('index', + 'dpdk_sample_applications.tex', + '', + '', + 'manual')] diff --git a/doc/guides/testpmd_app_ug/conf.py b/doc/guides/testpmd_app_ug/conf.py new file mode 100644 index 0000000..66d5d80 --- /dev/null +++ b/doc/guides/testpmd_app_ug/conf.py @@ -0,0 +1,41 @@ +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +execfile('../conf.py') + +release = check_output(['make', '-sRrC', '../../../', 'showversion']) + +# Overide the latex_documents to change the output name. +latex_documents = [ + ('index', + 'dpdk_testpmd_guide.tex', + '', + '', + 'manual')]