Jump to content

Module:CountryData/cacheF: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Add loadData-compatible modules to cache the content of the most-used country data
 
Put the redirects all on the summary cache. *** existing text overwritten ***
Line 1: Line 1:
local CountryData = require('Module:CountryData')
local CountryData = require('Module:CountryData')
local redirects = {FRA='France', FIN='Finland', FRO='Faroe Islands', FJI='Fiji', FSM='Federated States of Micronesia', FRG='West Germany', FIJ='Fiji', ['Free French']='Free France', ['Free French Forces']='Free France', FRY='FR Yugoslavia'}
local pages = {'French Guiana', 'Friesland', 'FR Yugoslavia', 'French Southern and Antarctic Lands', 'Florida', 'Flanders', 'Federated States of Micronesia', 'Faroe Islands', 'Falkland Islands', 'Fiji', 'Free France', 'Flemish Brabant', 'French First Republic', 'French Polynesia', 'Federation of Bosnia and Herzegovina', 'France', 'French Third Republic', 'Finland'}
local pages = {'Federation of Bosnia and Herzegovina', 'Falkland Islands', 'Federated States of Micronesia', 'French Southern and Antarctic Lands', 'French Third Republic', 'Free France', 'Friesland', 'French First Republic', 'Faroe Islands', 'FR Yugoslavia', 'Flanders', 'French Guiana', 'French Polynesia', 'Flemish Brabant', 'France', 'Florida', 'Finland', 'Fiji'}
local p = {
local p = {
redirects = redirects,
data = {}
data = {}
}
}

Revision as of 20:01, 3 May 2021

local CountryData = require('Module:CountryData')
local pages = {'French Guiana', 'Friesland', 'FR Yugoslavia', 'French Southern and Antarctic Lands', 'Florida', 'Flanders', 'Federated States of Micronesia', 'Faroe Islands', 'Falkland Islands', 'Fiji', 'Free France', 'Flemish Brabant', 'French First Republic', 'French Polynesia', 'Federation of Bosnia and Herzegovina', 'France', 'French Third Republic', 'Finland'}
local p = {
	data = {}
}
local frame = mw.getCurrentFrame()

for _,v in ipairs(pages) do
	p.data[v] = CountryData.gettable(frame, v, {})
end

return p