* Owen Davis <[email protected]> [Wed, 21 Dec 2011 19:18:46 +0000 
(UTC)]:
> It is littered with embedded HTML and string.format statements. Ugh.
> I'm going to look at something simple like Moustache (which has both
> JS and Lua implementations already) as a proof of concept.  Does
> anybody have a better suggestion?  I think Lua (or JS) by itself is 
not
> enough, there has to be a nice library of utility functions.  Has 
anyone
> thought about what that will really look like?
>
Also it would be great if Lua binding could perform parser functions. I 
believe that Extension:WikiScripts uses parser frame and can use current 
template parameters, when available:
http://www.mediawiki.org/wiki/Extension:WikiScripts
Template library (tpl_) allows the script to access the parser and the 
parameters of the template that invokes the script.

    tpl_arg( argname[, default] ) returns the argument which name is 
specified as an argument, or the default value if it is not set (if no 
default is specified, it returns false).
    tpl_named_args() returns all the named arguments to the template.
    tpl_numbered_args() returns all the numbered arguments.
    tpl_is_transcluded() returns whether the code is invoked from a 
template.

Dmitriy

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to