gen_index.py 518 字节
Newer Older
T
tink2123 已提交
1 2 3 4 5 6
import os.path, time
import exceptions
import glob
import os
if __name__ == '__main__':
    
T
Tink_Y 已提交
7
    file_object = open('index_en.rst', 'w')
T
tink2123 已提交
8 9 10 11 12
    file_object.write('''=============
API Reference
=============

..  toctree::
13

T
tink2123 已提交
14 15

''')
16
    file_object.write('    ../api_guides/index_en.rst'+'\n')
T
tink2123 已提交
17 18 19 20 21
    file_object.write('    fluid.rst'+'\n')
    for file_name in sorted(glob.glob("*.rst")):
        if file_name != ('index_en.rst' and 'fluid.rst'):
            file_object.write('    '+file_name + "\n")
    file_object.close( )