<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ALuaCall%2Fdoc</id>
	<title>Module:LuaCall/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ALuaCall%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:LuaCall/doc&amp;action=history"/>
	<updated>2026-06-15T10:23:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:LuaCall/doc&amp;diff=478655&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:LuaCall/doc&amp;diff=478655&amp;oldid=prev"/>
		<updated>2021-07-16T04:44:39Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating|alpha}}&lt;br /&gt;
&lt;br /&gt;
This module allows you to call any one single preinstalled Lua function, so that you don't need to write a module for one desired feature.&lt;br /&gt;
&lt;br /&gt;
The module '''may''' generate script errors -- whenever your call isn't valid Lua code, you see the error you would normally have.  For example,&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{#invoke:LuaCall|main|value=1.4512|math.fmod(value)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
because the second value is lacking. No effort is made to trap these.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|''arbitrary variables''|''parameters''|''function''}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The arbitrary variables are any key of your choice = any value of your choice.  Values are interpreted as strings unless tonumber(value) is not NaN - i.e. numbers should be converted to the numeric type.  No effort is made to interpret tables.&lt;br /&gt;
&lt;br /&gt;
The parameters all begin with ''reserved_'', which arbitrary variable should use.&lt;br /&gt;
&lt;br /&gt;
* ''reserved_return'' sets which output from the function you want, and defaults to 1.  For example, setting it to 2 for mw.ustring.gsub will return the number of replacements made.&lt;br /&gt;
&lt;br /&gt;
* ''reserved_debug'' - nonzero value forces display of a not particularly useful debug text&lt;br /&gt;
&lt;br /&gt;
The function is written as ''some.function.name(a,b,c)'' where some.function.name means something in the [[mw:Extension:Scribunto/Lua_reference_manual|Extension:Scribunto/Lua_reference_manual]] and a,b,c are the arbitrary variable names you've chosen.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|a=test&amp;amp;nbsp;|b=7|string.rep(a,b)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|pattern=(%a)|replace=%1.|string=I can't get no satisfaction|mw.ustring.gsub(string,pattern,replace)|reserved_return=1}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|pattern=(%a)|replace=%1.|string=I can't get no satisfaction|mw.ustring.gsub(string,pattern,replace)|reserved_return=2}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|value=1.4512|math.ceil(value)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|value=1.4512|math.modf(value)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|value=1.4512|math.modf(value)|reserved_return=2}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|mw.text.nowiki(s)|s={{URL|1=https://www.Amazon.com/}}}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|call|string.format|%04x|127}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|call|math.modf|1.4512}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|call|math.modf|1.4512|return=2}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Template categories below this line, please --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>