Module:Studio debug

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Revision as of 21:43, 17 September 2026 by Magent (talk | contribs) (Dump the bytes of the record name (via update-page on MediaWiki MCP Server))
Jump to navigationJump to search

Documentation for this module may be created at Module:Studio debug/doc

-- Temporary. Delete once Module:Studio sessions is behaving.

local p = {}

function p.bytes( frame )
	local raw = frame:callParserFunction( "#ask", {
		"[[Has performer::Harry Clark]]",
		"?Has track name=track",
		"mainlabel=record",
		"link=none",
		"searchlabel=",
		"limit=200",
		"format=plainlist",
		"sep=@@",
		"template=Studio appearance row",
	} )
	local unstripped = mw.text.unstrip( raw or "" )
	local record = unstripped:match( "^(.-)||" ) or unstripped
	record = record:match( "^([^#]*)" ) or record

	local out = { "len=" .. #record .. " [" }
	for i = 1, #record do
		table.insert( out, string.byte( record, i ) .. " " )
	end
	table.insert( out, "]" )
	return "<pre>" .. table.concat( out ) .. "</pre>"
end

return p