diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-05-29 11:47:59 +0200 |
---|---|---|
committer | Natanael Copa <natanael.copa@gmail.com> | 2009-05-29 11:47:59 +0200 |
commit | 290d71b1b8bba45be46087a78bdcbdd516199985 (patch) | |
tree | e7ab2c3916dc535e4db16dacbf1706ed71ac4977 /weblogimport | |
download | acf-weblog-290d71b1b8bba45be46087a78bdcbdd516199985.tar.bz2 acf-weblog-290d71b1b8bba45be46087a78bdcbdd516199985.tar.xz |
initial commitv0.1.0
based on weblog.tar.gz ncopa got by email.
Diffstat (limited to 'weblogimport')
-rwxr-xr-x | weblogimport | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/weblogimport b/weblogimport new file mode 100755 index 0000000..eaa1918 --- /dev/null +++ b/weblogimport @@ -0,0 +1,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() |