I’m extracting Modules from a Wiktionary XML dump and saving them locally in my filesystem in order to get the data required for expanding templates.
For example to get all the language data, I extracted the pages Module:language, Module:language/data, and the other related Modules by recursively finding all dependencies. I saved them locally in the structure that they appear, so “language” would be the top folder name, “data.lua” would be under that.
Then I made a “main.lua” to run the files from command line and output JSON.
All of this works until one of the modules need the
mw functions, like
mw.ustring, and it’s my understanding these come from the globally available mediawiki functions from Scribunto.
Is there a way to import the
mw functions into my local Lua files so I can run them from command line?