VOOZH about

URL: https://minecraft.wiki/w/Module:ArgTracker

⇱ Module:ArgTracker – Minecraft Wiki


Module:ArgTracker

From Minecraft Wiki
Jump to navigation Jump to search
Documentation[view] [edit] [history] [purge]Jump to code ↴

Tracks argument names that set in a specific template, include empty arguments, whether meanful in that template.

Add the following content into a template:

{{ #invoke: ArgTracker | main | _cat = Category name for tracking }}

|_cat= should contain and only contains one %s, which refers the name of the tracked argument. Defaults to %s.

Categories added by this module can usually find in Special:WantedCategories after pages updated.

[view] [edit] [history] [purge]The above documentation is transcluded from Module:ArgTracker/doc.
localp={}
functionp.main(f)
localargs=f
localframe=mw.getCurrentFrame()
iff==framethen
args={}
localparentArgs=frame:getParent().args
localselfArgs=frame.args
fork,vinpairs(parentArgs)do
args[k]=v
end
fork,vinpairs(selfArgs)do
ifnotargs[k]then
args[k]=v
end
end
end
localcategory=string.format('[[Category:%s]]',args['_cat']or'%s')
localcategories={}
fork,_inpairs(args)do
ifk~='_cat'then
table.insert(categories,category:format(k))
end
end
returntable.concat(categories)
end
returnp
Retrieved from "https://minecraft.wiki/w/Module:ArgTracker?oldid=3000077"

Navigation menu