Jump to content

Module:Sandbox/Jackmcbarn

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jackmcbarn (talk | contribs) at 19:29, 17 July 2014 (build new data format). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local data = require('Module:Video game reviews/data')
local newBuffer = require('Module:OutputBuffer')

local p = {}

function p.main(frame)
	local getBuffer, print, printf = newBuffer()
	print( 'return {\n\treviewers = {\n' )
	for _,v in ipairs(data.reviewers) do
		printf('\t\t[%q] = %q,\n', v[2], v[1])
	end
	print( '\t},\n\taggregators = {\n' )
	for _,v in ipairs(data.aggregators) do
		printf('\t\t[%q] = %q,\n', v[2], v[1])
	end
	print( '\t},\n\tsystems = {\n' )
	for _,v in ipairs(data.systems) do
		printf('\t\t[%q] = %q,\n', v[2], v[1])
	end
	print( '\t}\n}' )
	return getBuffer()
end

return p