未验证 提交 42925e07 编写于 作者: T tianshuo78520a 提交者: GitHub

Site paddle.* (#1972)

* change fluid site

* change site paddle.*
上级 d29ece4c
......@@ -14,11 +14,10 @@ API Reference
:maxdepth: 1
../api_guides/index_en.rst
fluid.rst
''')
target_dirs = ['.', 'data']
file_names = []
for target_dir in target_dirs:
if target_dir == '.':
......@@ -26,7 +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:
for i in range(2):
line = f.readline().strip()
if line.find('paddle.') != -1:
file_object.write(' '+file_name + "\n")
file_names.remove(file_name)
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")
......@@ -6,6 +6,8 @@ API Reference
:maxdepth: 1
../api_guides/index_en.rst
nn.rst
tensor.rst
fluid.rst
backward.rst
clip.rst
......@@ -19,10 +21,8 @@ API Reference
layers.rst
metrics.rst
nets.rst
nn.rst
optimizer.rst
profiler.rst
regularizer.rst
tensor.rst
transpiler.rst
unique_name.rst
......@@ -14,8 +14,20 @@ API Reference
''')
file_object.write(' ../api_guides/index_cn.rst'+'\n')
file_names = []
file_names = glob.glob("*.rst")
for file_name in sorted(file_names):
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_names.remove(file_name)
file_object.write(' fluid_cn.rst'+'\n')
for file_name in sorted(glob.glob("*.rst")):
for file_name in sorted(file_names):
if file_name != 'index.rst' and file_name != 'index_cn.rst' and file_name != 'fluid_cn.rst':
file_object.write(' '+file_name + "\n")
file_object.close( )
......@@ -6,6 +6,9 @@ API Reference
:maxdepth: 1
../api_guides/index_cn.rst
framework_cn.rst
nn_cn.rst
tensor_cn.rst
fluid_cn.rst
api_tree_cn.rst
backward_cn.rst
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册