#!/usr/bin/python

import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../scripts/mydoc')

import mydoc

workDir = os.getcwd()
doc = mydoc.MyDoc(workDir)
if len(sys.argv) > 1 and sys.argv[1] == '-g':
    doc.generate()
if len(sys.argv) > 1 and sys.argv[1] == '-p':
    doc.convert()
    os.system('apidoc -f "doc.*" -i doc -o public/apidoc/')
else:
    doc.convert()
