From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 3E2A97D14 for ; Thu, 4 May 2017 23:56:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9C2DB20C36; Thu, 4 May 2017 17:56:33 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 04 May 2017 17:56:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=DWgKb9rEuwueR8CtdgrTOQFx2su oFaIxEFf8if/GBqA=; b=E28E2wVXF47Mzw4u7P0Se8xDMQ+48Ysz18pb0DTzJlO 8aCiN0gqMDzDfcwC/8HDGJ6puG9ONDX8BdsnxADoyLoPmcpeKbF/X0mbAQt5xHRk ZJ+tcTUipYr2N9hgQoaXQSVfstxI3cfMTEpdIwl55ZeOkNq1OIirNxiVMmezI2V4 = DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=DWgKb9 rEuwueR8CtdgrTOQFx2suoFaIxEFf8if/GBqA=; b=gRWzMVf7yZ3dPi6EGg+9wU W0yZ6knrnbHgkRbk+8Dx+bEJgp4a0c9Ei8V6JXOKt3Fs5gkxsBbtLsMqNsclWAZ/ i4gei1FbvMc6SZVLdfMYuS5/3ommYGdRonaCze0z5wxAs8vps7TylsFNCwfUdIII ZzcD4PVGcKolrYjfcUQUnw8TqgBDPCWI8zhzfqkX0lc1BxNyecny7rcWLL4qD58X aHZznpA7pYSHUBR5I/YUrQ0/JWsAFPbzYepjaFlZLEjK+2mE2Rn/mcMK2T96DQEb krBDnm/zmT1DCoPRnyE1t06Qt7lgMntvZ1Xu+Ol38pMKrE3xsAPoRr15H19CkWvw == X-ME-Sender: X-Sasl-enc: /s4i8v0W/3ePE/YuicA3KkmVHsUXKPtnTICohW//hbuA 1493934993 Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 182D37E317 for ; Thu, 4 May 2017 17:56:33 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 4 May 2017 23:56:29 +0200 Message-Id: <20170504215629.28834-1-thomas@monjalon.net> X-Mailer: git-send-email 2.12.2 Subject: [dpdk-dev] [PATCH] doc: factorize overview table CSS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2017 21:56:34 -0000 There were several tables in NIC and crypto guides with the same copy-pasted CSS addition. It is moved into one unique place: conf.py. Signed-off-by: Thomas Monjalon --- doc/guides/conf.py | 75 +++++++++++-- doc/guides/cryptodevs/overview.rst | 212 ------------------------------------- doc/guides/nics/overview.rst | 53 ---------- 3 files changed, 66 insertions(+), 274 deletions(-) diff --git a/doc/guides/conf.py b/doc/guides/conf.py index ef0e1c607..c3cd0bd69 100644 --- a/doc/guides/conf.py +++ b/doc/guides/conf.py @@ -178,7 +178,7 @@ def process_numref(app, doctree, from_docname): node.replace_self(newnode) -def generate_overview_table(output_filename, section, table_name, title): +def generate_overview_table(output_filename, table_id, section, table_name, title): """ Function to generate the Overview Table from the ini files that define the features for each driver. @@ -258,9 +258,8 @@ def generate_overview_table(output_filename, section, table_name, title): outfile = open(output_filename, 'w') num_cols = len(header_names) - print('.. table:: ' + table_name + '\n', - file=outfile) - + print_table_css(outfile, table_id) + print('.. table:: ' + table_name + '\n', file=outfile) print_table_header(outfile, num_cols, header_names, title) print_table_body(outfile, num_cols, ini_files, ini_data, default_features) @@ -316,29 +315,87 @@ def print_table_divider(outfile, num_cols): print_table_row(outfile, feature, line) +def print_table_css(outfile, table_id): + template = """ +.. raw:: html + + +""" + print(template.replace("idx", "id%d" % (table_id)), file=outfile) + + def setup(app): table_file = dirname(__file__) + '/nics/overview_table.txt' - generate_overview_table(table_file, + generate_overview_table(table_file, 1, 'Features', 'Features availability in networking drivers', 'Feature') table_file = dirname(__file__) + '/cryptodevs/overview_feature_table.txt' - generate_overview_table(table_file, + generate_overview_table(table_file, 1, 'Features', 'Features availability in crypto drivers', 'Feature') table_file = dirname(__file__) + '/cryptodevs/overview_cipher_table.txt' - generate_overview_table(table_file, + generate_overview_table(table_file, 2, 'Cipher', 'Cipher algorithms in crypto drivers', 'Cipher algorithm') table_file = dirname(__file__) + '/cryptodevs/overview_auth_table.txt' - generate_overview_table(table_file, + generate_overview_table(table_file, 3, 'Auth', 'Authentication algorithms in crypto drivers', 'Authentication algorithm') table_file = dirname(__file__) + '/cryptodevs/overview_aead_table.txt' - generate_overview_table(table_file, + generate_overview_table(table_file, 4, 'AEAD', 'AEAD algorithms in crypto drivers', 'AEAD algorithm') diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst index 656cf18c9..6764d0d93 100644 --- a/doc/guides/cryptodevs/overview.rst +++ b/doc/guides/cryptodevs/overview.rst @@ -35,59 +35,6 @@ Supported Feature Flags .. _table_crypto_pmd_features: -.. raw:: html - - - .. include:: overview_feature_table.txt Supported Cipher Algorithms @@ -95,59 +42,6 @@ Supported Cipher Algorithms .. _table_crypto_pmd_cipher_algos: -.. raw:: html - - - .. include:: overview_cipher_table.txt Supported Authentication Algorithms @@ -155,59 +49,6 @@ Supported Authentication Algorithms .. _table_crypto_pmd_auth_algos: -.. raw:: html - - - .. include:: overview_auth_table.txt Supported AEAD Algorithms @@ -215,57 +56,4 @@ Supported AEAD Algorithms .. _table_crypto_pmd_aead_algos: -.. raw:: html - - - .. include:: overview_aead_table.txt diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst index afb65038b..757a3c901 100644 --- a/doc/guides/nics/overview.rst +++ b/doc/guides/nics/overview.rst @@ -50,59 +50,6 @@ Most of these differences are summarized below. .. _table_net_pmd_features: -.. raw:: html - - - .. include:: overview_table.txt .. Note:: -- 2.12.2