মডিউল নথি[তৈরি করুন]
local Date = require("মডিউল:তারিখ")._Date
local p ={}
local data = require("মডিউল:নিবন্ধ ইতিহাস/উপাত্ত")
local LABEL = data.label
local MESSAGE =  data.message
local RESULT = data.result
local function date(txt) -- তারিখগুলোকে সাজানোর জন্য
	local dt = Date(txt)
	if(dt) then
		dt = mw.language.bn:formatDate("F d, Y",dt:text("mdy"))
	else
		dt = "<font class='error'>ভুলভাবে বিন্যস্ত তারিখ</font>"
	end
	return dt
end
local ACT = "(%a+)(%d+)(%a*)"
function show(config)
	local st = '{| align="center" class="tmbox tmbox-notice'
	if(config["actioncount"] > 1 or config["small"]) then
		st= st.. " tmbox-small"
		end
	--- বর্তমান অবস্থা প্রদর্শন
	if(MESSAGE[config["currentstatus"]]==nil) then do return "<includeonly>[[বিষয়শ্রেণী:বর্তমান অবস্থাবিহীন নিবন্ধ ইতিহাস]]</includeonly>" end end
	local topic = data.topic[config["topic"]]
	if topic == nil then topic = "অজানা" end
	st = st..'"\n|-\n|[[file:'..data.image[config["currentstatus"]]..'|30px]]|| align="center" colspan="2" |'..string.format(MESSAGE[config["currentstatus"]],config["title"],config["title"],topic,topic)
	st= st.. '\n|-\n!তারিখ!!মাইলফলক!!ফলাফল\n|-\n'
	for i,v in pairs(config["action"]) do
		if(v["date"]=="") then v["date"]=nil end
		if(v["link"]=="") then v["link"]=nil end
		if(LABEL[v[""]] and RESULT[v["result"]] and v["date"]~="") then
			dt = date(v["date"])
			st=st.."|"
			if(v["oldid"]~="") then
				st=st.."[//bn.wikipedia.org/w/index.php?oldid="..v["oldid"].." "..dt.."]|"
			else
				st=st..dt.."|"
			end
			if(v["link"]~="") then
				st=st.."|[["..v["link"].."|"..LABEL[v[""]].."]]||"
			else
				st=st.."|"..LABEL[v[""]].."||"
			end
			st=st..RESULT[v["result"]].."\n|-\n"
		end
	end
	-- মাইলফলক শেষ; এখন আজাকি প্রদর্শন
	dyk = config["dyk"]
	c = config["dykcount"]
	if(c > 0) then -- আজাকি রয়েছে
		t = date(dyk[0]["date"]) -- প্রথম আজাকি
		dyk[0] = nil
		if(c > 1) then --একাধিক আজাকি
			last = date(dyk[c-1]["date"]) -- সর্বশেষ আজাকি মনোনয়ন যা "ও" দিয়ে যুক্ত হবে
			dyk[c-1] = nil -- সর্বশেষ আজাকি মনোনয়ন সরিয়ে ফেলা হয়েছে
			for n,d in pairs(dyk) do
				t = t..", "..date(d["date"])
			end
			t=t.." ও "..last
		end
		st = st.."|[[file:"..data.image.dyk.."|30px]]||"..string.format(MESSAGE["dyk"],t).."\n|-\n"
	end
	st = st.."|}"
	return st
end
function p.main(frame)
	local ar = frame:getParent().args
	config = {
		["action"] = {},
		["dyk"] = {},
		["small"] = ar["small"] or nil,
		["dykcount"] = 0,
		["actioncount"] = 0,
		["title"]=mw.title.getCurrentTitle()["text"],
		["topic"] = ar["topic"]
		}
	ar["small"] = nil
	local c = 0
	local s = ""
	for p,v in pairs(ar) do
		local a,n,t = string.match(p,ACT)
		if(a) then
			t = tostring(t)
			n = tonumber(n) - 1
			if(config[a][n] == nil) then
				config[a][n]={}
			end
			config[a][n][t] = v
			t = a.."count"
			config[t] = config[t] + 1 --- Increment history count
		else
			config[p] = v
		end
	end
	return show(config)
end
return p