-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathmakedoc.py
More file actions
35 lines (33 loc) · 808 Bytes
/
makedoc.py
File metadata and controls
35 lines (33 loc) · 808 Bytes
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
#!/usr/bin/python
# email: yao050421103@gmail.com
import sys
import os.path
import string
import shutil
def make():
if os.path.exists('release'):
shutil.rmtree('release')
dirs = [
'release',
'release/res'
]
for dir in dirs:
os.mkdir(dir)
cmds = [
'cp -r doc release',
'cp res/design.png release/res',
'cp res/logo.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()