contrib: add WoL application to menuconfig
[project/luci.git] / contrib / luadoc / lua / luadoc / init.lua
1 -------------------------------------------------------------------------------
2 -- LuaDoc main function.
3 -- @release $Id: init.lua,v 1.4 2008/02/17 06:42:51 jasonsantos Exp $
4 -------------------------------------------------------------------------------
5
6 local require = require
7
8 local util = require "luadoc.util"
9
10 logger = {}
11
12 module ("luadoc")
13
14 -------------------------------------------------------------------------------
15 -- LuaDoc version number.
16
17 _COPYRIGHT = "Copyright (c) 2003-2007 The Kepler Project"
18 _DESCRIPTION = "Documentation Generator Tool for the Lua language"
19 _VERSION = "LuaDoc 3.0.1"
20
21 -------------------------------------------------------------------------------
22 -- Main function
23 -- @see luadoc.doclet.html, luadoc.doclet.formatter, luadoc.doclet.raw
24 -- @see luadoc.taglet.standard
25
26 function main (files, options)
27 logger = util.loadlogengine(options)
28
29 -- load config file
30 if options.config ~= nil then
31 -- load specified config file
32 dofile(options.config)
33 else
34 -- load default config file
35 require("luadoc.config")
36 end
37
38 local taglet = require(options.taglet)
39 local doclet = require(options.doclet)
40
41 -- analyze input
42 taglet.options = options
43 taglet.logger = logger
44 local doc = taglet.start(files)
45
46 -- generate output
47 doclet.options = options
48 doclet.logger = logger
49 doclet.start(doc)
50 end