From 38fd5c725807cfb53f672edfd654dbaaeb4713aa Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Tue, 4 Aug 2020 09:52:42 +0800 Subject: [PATCH] Add fluid.rst (#2316) * Add fluid.rst * fix cn rst --- doc/fluid/api/gen_index.py | 14 +++++++------- doc/fluid/api/index_en.rst | 30 ++++++++++++++++++++++-------- doc/fluid/api_cn/index_cn.rst | 18 ++++++++++++++++++ 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/doc/fluid/api/gen_index.py b/doc/fluid/api/gen_index.py index 16bea3fd4..4cc7272b0 100644 --- a/doc/fluid/api/gen_index.py +++ b/doc/fluid/api/gen_index.py @@ -4,7 +4,7 @@ import glob import os if __name__ == '__main__': - with open('index_en.rst', 'w') as file_object: + with open('index_en.rst', 'w') as file_object: file_object = open('index_en.rst', 'w') file_object.write('''============= API Reference @@ -25,16 +25,16 @@ API Reference else: pattern = target_dir + '/*.rst' file_names.extend(glob.glob(pattern)) - + for file_name in sorted(file_names): - with open(file_name, 'r')as f: + with open(file_name, 'r') as f: for i in range(2): line = f.readline().strip() if line.find('paddle.') != -1: - file_object.write(' '+file_name + "\n") + file_object.write(' ' + file_name + "\n") file_names.remove(file_name) - file_object.write(' '+'fluid.rst' + "\n") + file_object.write(' ' + 'fluid.rst' + "\n") for file_name in sorted(file_names): - if file_name not in ['index_en.rst', 'fluid.rst']: - file_object.write(' '+file_name + "\n") + if file_name not in ['index_en.rst']: + file_object.write(' ' + file_name + "\n") diff --git a/doc/fluid/api/index_en.rst b/doc/fluid/api/index_en.rst index efbe319fb..3d98746f0 100644 --- a/doc/fluid/api/index_en.rst +++ b/doc/fluid/api/index_en.rst @@ -6,15 +6,29 @@ API Reference :maxdepth: 1 ../api_guides/index_en.rst - paddle.rst dataset.rst - tensor.rst - nn.rst - imperative.rst declarative.rst - optimizer.rst - metric.rst framework.rst + imperative.rst io.rst - utils.rst - incubate.rst + metric.rst + nn.rst + optimizer.rst + tensor.rst + fluid.rst + backward.rst + clip.rst + data/data_reader.rst + data/dataset.rst + dygraph.rst + executor.rst + fluid.rst + initializer.rst + layers.rst + metrics.rst + nets.rst + paddle.rst + profiler.rst + regularizer.rst + transpiler.rst + unique_name.rst diff --git a/doc/fluid/api_cn/index_cn.rst b/doc/fluid/api_cn/index_cn.rst index c45a09e4d..94e629783 100644 --- a/doc/fluid/api_cn/index_cn.rst +++ b/doc/fluid/api_cn/index_cn.rst @@ -107,3 +107,21 @@ Note。 io_cn.rst utils_cn.rst incubate_cn.rst + fluid_cn.rst + backward_cn.rst + clip_cn.rst + data_cn/data_reader_cn.rst + data_cn/dataset_cn.rst + dataset_cn.rst + dygraph_cn.rst + executor_cn.rst + initializer_cn.rst + io_cn.rst + layers_cn.rst + metrics_cn.rst + nets_cn.rst + optimizer_cn.rst + profiler_cn.rst + regularizer_cn.rst + transpiler_cn.rst + unique_name_cn.rst -- GitLab