-
Notifications
You must be signed in to change notification settings - Fork 1
/
makedoc.py
39 lines (37 loc) · 993 Bytes
/
makedoc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# email: [email protected]
import sys
import os.path
import string
import shutil
def make():
if os.path.exists('release'):
shutil.rmtree('release')
folders = [
'release',
'release/res'
]
for folder in folders:
os.mkdir(folder)
cmds = [
'cp res/design.png release/res',
'cp res/logo.png release/res',
'cp res/array.png release/res',
'cp res/dict.png release/res',
'cp res/object.png release/res',
'cp res/scalar.png release/res',
'cp res/string.png release/res',
'cp README.md release/',
'cp README_ZH.md release/'
]
for cmd in cmds:
os.system(cmd)
src = 'release/'
des = 'html/'
if os.path.exists(des):
shutil.rmtree(des)
os.system('generate-md --layout github --input %s --output %s' % (src, des))
shutil.rmtree('release')
print 'make doc success!'
if __name__ == "__main__":
make()