summaryrefslogtreecommitdiffstats
path: root/weblogimport
blob: eaa1918c81e5c699c09b51365017d232b67a6805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/lua

-- Set the path to load libraries and the model
local PATH=package.path
package.path = "/usr/share/acf/app/weblog/?.lua;/usr/share/acf/lib/?.lua;" .. package.path
local t = require("weblog-model")
package.path = PATH

-- create a Configuration Framework Entity (cfe)
-- returns a table with at least "value", "type", and "label"
cfe = function ( optiontable )
	optiontable = optiontable or {}
	me = { 	value="",
		type="text",
		label="" }
	for key,value in pairs(optiontable) do
		me[key] = value
	end
	return me
end
_G.cfe = cfe

-- Call the weblog model to import the logs
t.importlogs()