Felipe Daragon

LuaExecute

PmWiki LuaExecute

LuaExecute is a PmWiki markup plugin that allows you to use Lua scripts to generate parts of your wiki page. The Lua script is executed client-side, by the visitor's web browser. This makes use of a Lua 5.2 virtual machine written in JavaScript. The source and more details can be found here. Below, you can see a live demo of the plugin.

Demo

(:lua:)
function demo()
 print('Counting from 1 to 5...')
 for v = 1, 5 do
  print(v)
 end
end

demo()
print('Today is '..os.date())
print('Pi is '..math.pi())
print('It works! <o>') -- By default, HTML is not allowed
print('')
print('This content was generated by '.._VERSION..'.')
(:luaend:)