Questions tagged [scribunto]

Scribunto is a parser extension which allows for embedding scripting languages in MediaWiki.

Scirbunto currently only supports the Lua programming language.

20 questions
8
votes
2 answers

Lua error on MediaWiki

I'm trying to set up a MediaWiki, and trying to use the Navbox template. I had everything working fine on my local machine, but when I copied it all to the server I get Lua script errors, specifically: Lua error at line 302: attempt to call field…
yedidyak
  • 1,964
  • 13
  • 26
2
votes
1 answer

Can user's custom JavaScript on MediaWiki call a Lua module?

On MediaWiki wikis each user has a user JavaScript page they can put code in, much like GreaseMonkey but without extensions. Such as at User:YourUsername/vector.js MediaWiki has also had an embedded Lua, called Scribunto, for a little while now. I…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
2
votes
1 answer

How to prevent escaping table related tags outside of a table context

I am working on a Scribunto module that accepts a variable amount of arguments to produce a table. I have a template that invokes the module, and a separate template for the rows in the table. However, one of the components will always be outside of…
M. A.
  • 415
  • 3
  • 12
1
vote
1 answer

MediaWiki Scribunto Lua error: Internal error: The interpreter exited with status 2

I have done a fresh installation on my local development machine of MediaWiki 1.24.2. I have installed Scribunto and checked it is installed correctly on the list of extensions. I'm getting an error when I try and create an InfoBox. The error…
1
vote
1 answer

MediaWiki Scribunto extension's "Listen" module not generating expected HTML

I have a MediaWiki installation (1.23) with the Scribunto extension and Module:Listen. I try to invoke this module from an article like so: {{Listen |filename = Noise.ogg |title = Noise |description = Some noise }} This generates the…
Colin
  • 79
  • 1
  • 7
1
vote
1 answer

How to run Lua code directly inline with Scribunto

I have a very short piece of lua code (example: os.date("%Z") ). I want to know if it is possible (currently or planned) to invoke that code directly on the same page, rather than creating a module with only one function, which job is to call that…
user2284570
  • 2,891
  • 3
  • 26
  • 74
1
vote
3 answers

How to detect DST (whether summer time is active) with scribunto

According to the current date, How I could know if it the hour is in summer time in Lua. For example, the value in France would be actually true (CEST is currently used). During winter it would be false. Forget is this is too specific: I am just…
user2284570
  • 2,891
  • 3
  • 26
  • 74
1
vote
1 answer

How to convert "42°33'N, 1°33'E" to "42.55|1.55" in Scribunto (MediaWiki-hosted Lua)

Scribunto is a MediaWiki-hosted version of Lua. I believe it is fairly standard Lua. I want to convert geographic coordinates from this format: 42°33'N, 1°33'E ... to this format: 42.55|1.55 How to do this in Scribunto?
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0
votes
0 answers

Error when switching to Luasandbox: Scribunto_LuaInterpreterNotFoundError

I installed a new Instance of MediaWiki 1.39 on a Debian 11 server with PHP 8.2.2. I installed the Scribunto extension (and its dependencies) with Luastandalone binaries at first and it worked. A script that we would like to use seems to meant for…
LumenAlbum
  • 155
  • 7
0
votes
1 answer

Expanding a Scribunto module that doesn't have a function

I want to get the return value of this Wikimedia Scribunto module in Python. Its source code is roughly like this: local Languages = {} Languages = { ["aa"] = { name = "afarština", dir = "ltr", name_attr_gen_pl =…
Pux
  • 421
  • 3
  • 18
0
votes
0 answers

Mediawiki Scribunto can't split page by slash

I have a Scribunto module that is supposed to format sub pages using more indented bullets: local p = {} --p stands for package function p.subpage_bullets( frame ) local page = frame.args.page local parts = mw.text.split( page, "/", true ) …
IttayD
  • 28,271
  • 28
  • 124
  • 178
0
votes
1 answer

Using wikipedia lua modules in a script

OK, so, let me first make it clear that I have no idea how Lua really works, never written more than 10 lines of code in it and that I'm generally confused about how MediaWiki + Scribunto + Lua works... So... I have this wiktionary…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
0
votes
1 answer

Mediawiki scribunto lua module do not know builtin functions

I am having a problem with calling Lua built-in functions using Scribunto. I created basic module Module:Item local p = {}; function p.test(frame) print("Hello World!") end return p Which I call in different page as {{#invoke: Item |…
Look
  • 3
  • 1
0
votes
1 answer

How to make a pattern in Lua that matches only when no number (normal or roman) is present?

I want to make a pattern that matches only when a string contains no arabic or roman numerals (note that the roman numerals can only go up to X (10)) Examples: "Rock" <-- matches "Rock IV" <-- doesn't match "Rock 4" …
joker876
  • 45
  • 1
  • 6
0
votes
0 answers

MediaWiki "Save changes" timeout issue

So I have MediaWiki installed on my computer (and I'm running it through Wamp64) and it has been working totally fine until today. Essentially, a page I was working on starting timing out when I tried to save edits with the following error: Fatal…
user3684314
  • 707
  • 11
  • 31
1
2