Skip to content
Snippets Groups Projects
Commit 53f395f0 authored by legac's avatar legac
Browse files

Code documentation is now based on epydoc.

Remove old odt fiesl which are now in the plugin_dbui_book.
parent a15b1a55
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ sessions/
static/plugin_dbui/dbui-debug.js
static/plugin_dbui/dbui-min.js
static/plugin_extjs/
static/plugin_dbui/docs/epydoc
static/plugin_mathjax/
uploads/
web2py.plugin.dbui.*.w2p
......@@ -49,6 +49,8 @@ JSBASE = 'static/plugin_dbui/src/base.js'
JSLIBDEBUG = 'static/plugin_dbui/dbui-debug.js'
JSLIBMIN = 'static/plugin_dbui/dbui-min.js'
JSLIBSRC = 'static/plugin_dbui/src'
HTMLDOC = 'static/plugin_dbui/docs/epydoc'
NOW = datetime.datetime.now()
PACK_PLUGIN_URL = 'http://localhost:8000/%s/default/pack_plugin' % APP
......@@ -69,6 +71,25 @@ def clean():
print 'file', el, 'is removed.'
def epydoc():
"""Generate the epydoc documentation
The HTML files are located in static/plugin_dbui/docs/
"""
# clean the directory
for el in os.listdir(HTMLDOC):
os.remove(os.path.join(HTMLDOC, el))
cmd = ["epydoc", "--html",
"--name", "plugin_dbui",
"-o", HTMLDOC,
"--parse-only",
"-v",
"modules/plugin_dbui/*.py"]
subprocess.call(cmd)
print "HTML documentation in", HTMLDOC
def get_version():
"""Get the current version identifier.
......@@ -197,11 +218,21 @@ if __name__ == '__main__':
# define script options
ops = optparse.OptionParser()
ops.add_option("-a", "--all",
action="store_true",
dest= "all",
help= "run all steps.")
ops.add_option("-c", "--clean",
action="store_true",
dest= "clean",
help= "clean build files and exit.")
ops.add_option("-e", "--epydoc",
action="store_true",
dest= "epydoc",
help= "generate the epydoc documentation.")
ops.add_option("-g", "--git",
action="store_true",
......@@ -228,7 +259,9 @@ if __name__ == '__main__':
dest= "web2py",
help= "pack the web2py plugin.")
ops.set_defaults(clean=False,
ops.set_defaults(all=False,
clean=False,
epydoc=False,
get=False,
git=False,
set=False,
......@@ -243,9 +276,11 @@ if __name__ == '__main__':
print "\nThe version of the current release is %s\n" % version
sys.exit(0)
# by default run all steps: update, git, YUIcompressor and web2py
if not (opt.set or opt.git or opt.yuicompressor or opt.web2py):
# run all steps
if opt.all:
opt.clean = True
opt.set = True
opt.epydoc = True
opt.git = True
opt.yuicompressor = True
opt.web2py = True
......@@ -265,10 +300,18 @@ if __name__ == '__main__':
version = raw_input('Enter the version identifier: ')
set_version(version)
if opt.epydoc:
epydoc()
if opt.yuicompressor: yuicompressor()
if opt.git: git()
if opt.web2py: web2py()
if opt.yuicompressor:
yuicompressor()
if opt.git:
git()
if opt.web2py:
web2py()
print 'Exit buidVersion\n'
sys.exit(0)
\ No newline at end of file
File deleted
File deleted
File deleted
File deleted
static/plugin_dbui/docs/gluon_dal_navigation.png

56.2 KiB

This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment