Difference between revisions of "Module:Infobox television season disambiguation check/sandbox"
Jump to navigation
Jump to search
test>Gonnym |
test>Gonnym |
||
| Line 6: | Line 6: | ||
local validDisambiguationPatternList = { | local validDisambiguationPatternList = { | ||
| − | validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) | + | validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) (%d+)$", type = 4}, --"VALIDATION_TYPE_YEAR_SEASON_NUMBER" |
| − | + | validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) (%d+)$", type = 5}, -- "VALIDATION_TYPE_COUNTRY_SEASON_NUMBER" | |
| − | validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) | + | validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+)", type = 7}, --"VALIDATION_TYPE_COUNTRY_SEASON" |
| − | validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) | + | validateDisambiguation.DisambiguationPattern{pattern = "^(%d+)", type = 6}, -- "VALIDATION_TYPE_SEASON_NUMBER" |
| − | |||
| − | validateDisambiguation.DisambiguationPattern{pattern = "^ | ||
| − | |||
} | } | ||
Revision as of 08:59, 11 July 2019
Documentation for this module may be created at Module:Infobox television season disambiguation check/sandbox/doc
-- This module requires the use of the following modules.
local getArgs = require('Module:Arguments').getArgs
local validateDisambiguation = require('Module:Television infoboxes disambiguation check/sandbox')
local p = {}
local validDisambiguationPatternList = {
validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) (%d+)$", type = 4}, --"VALIDATION_TYPE_YEAR_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) (%d+)$", type = 5}, -- "VALIDATION_TYPE_COUNTRY_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+)", type = 7}, --"VALIDATION_TYPE_COUNTRY_SEASON"
validateDisambiguation.DisambiguationPattern{pattern = "^(%d+)", type = 6}, -- "VALIDATION_TYPE_SEASON_NUMBER"
}
local exceptionList = {
"^Bigg Boss %(Hindi season %d+%)$"
}
local otherInfoboxList = {
["[^.]*TV series$"] = "[[Category:Television articles using incorrect infobox|T]]",
}
-- Currently unused lists that need to be passed to the base module.
local validDisambiguationTypeList = {
"TV series, season",
"TV series, series",
"season",
"series"
}
local function getOtherInfoboxListMerged()
local infoboxTelevisionDisambiguation = require('Module:Infobox television disambiguation check/sandbox')
local list = infoboxTelevisionDisambiguation.getDisambiguationTypeList()
for i = 1, #list do
otherInfoboxList[list[i]] = "[[Category:Television articles using incorrect infobox|T]]"
end
return otherInfoboxList
end
local function _main(args)
local title = args[1]
local otherInfoboxListMerged = getOtherInfoboxListMerged()
return validateDisambiguation.main(title, validDisambiguationTypeList, validDisambiguationPatternList, exceptionList, otherInfoboxListMerged)
end
function p.main(frame)
local args = getArgs(frame)
local category, debugString = _main(args)
return category
end
function p.test(frame)
local args = getArgs(frame)
local category, debugString = _main(args)
return debugString
end
return p