beatak / meetup.tweener

Simple Tweening for JavaScript

This URL has Read+Write access

meetup.tweener / makedoc
100755 53 lines (41 sloc) 1.144 kb
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python
 
import os
import sys
import shutil
 
def myfunc ():
  print "makedoc: Making documents for Meetup.Tweener"
 
  n = os.system('which NaturalDocs')
  if n != 0:
    print "please install NaturalDocs first."
    return
 
  path = sys.argv[0];
  arr = path.split('/')
  SCRIPT_NAME = arr.pop()
  SCRIPT_BASE = '/'.join(arr)
  # print SCRIPT_BASE
  # print SCRIPT_NAME
 
  DOCUMENT_PATH = SCRIPT_BASE + '/../meetup.tweener.gh-pages'
 
  if os.path.exists(DOCUMENT_PATH) == 0:
    print 'this script requires the following path existing: ' + DOCUMENT_PATH
    return
 
  NATURALDOCS = SCRIPT_BASE + '/naturaldocs'
 
  com = []
  com.append('NaturalDocs -i ')
  com.append(SCRIPT_BASE)
  com.append('/src -p ')
  com.append(NATURALDOCS)
  com.append(' -o HTML ')
  com.append(DOCUMENT_PATH)
  com.append(' -s meetup')
  os.system(''.join(com))
  # print(''.join(com))
 
  files = os.listdir(NATURALDOCS + '/images')
  for file in files:
    SRC = NATURALDOCS + '/images/' + file
    DEST = DOCUMENT_PATH + '/styles/' + file
    shutil.copy(SRC, DEST)
    # print SRC
    # print DEST
 
  print 'Done!'
 
if __name__ == '__main__':
  myfunc()