Aller au contenu

Module:DonnéesListeria

Une page de Wikipédia, l'encyclopédie libre.

 Documentation[créer] [purger]
local p= {

	extraction = function(page_code, template_name)
		template_name = template_name or "DataTemplate"
		--local removed_header = page_code:gsub("^.*{{[^{]*"..template_name.."| *\n","",1)
		
		local removed_header = page_code:gsub("^.*{{[^{]*".. template_name,"",1)
		                                :gsub("^[^=]*= *",'',1)
		                                :gsub("}}[^}]*{{Wikidata list end}}.*$", "")
		
		--if removed_header then 
			return removed_header--:gsub("}}.*","")
		--end
		
	end;
}

	
p.donnees = function(frame) 
		local all_datas = mw.title.new(frame.args[1]):getContent() -- frame:expandTemplate{
		local tname=frame.args[2]
		return p.extraction(all_datas, tname)
	end


return p