Jump to content

Module:ArbCaseAlias/data

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Isaacl (talk | contribs) at 23:11, 2 June 2019 (reorder date info so the year is at the beginning, which matches the format of the other aliases, so in theory the date info can be used as an alias (an appropriate normalizeAlias function still has to be added)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local config = { }

config.arbCaseAliasInfo = {
	caseInfoFor = {
		['2019'] = {
			['Alex Shih'] = {
				byYear = '2019-1',
				byColour = '2019-red',
				dateOpened = '2019 February 19',
			},
		    ['Enigmaman'] = {
		    	byYear = '2019-2',
		    	byColour = '2019-orange',
		    	dateOpened = '13 April 2019',
		    	dateClosed = '2019 May 6',
		    },
		    ['Rama'] = {
		    	byYear = '2019-3',
		    	byColour = '2019-yellow',
		    	dateOpened = '2019 May 2',
		    },
		    ['Canadian politics'] = {
		    	byYear = '2019-4',
		    	byColour = '2019-green',
		    	dateOpened = '2019 May 24',
		    },
		},  -- 2019
		['2018'] = {
			['Joefromrandb and others'] = {
				byYear = '2018-1',
				byColour = '2018-red',
			},
			['Civility in infobox discussions'] = {
				byYear = '2018-2',
				byColour = '2018-orange',
			},
		    ['German war effort'] = {
		    	byYear = '2018-3',
		    	byColour = '2018-yellow',
		    },
		    ['BLP issues on British politics articles'] = {
		    	byYear = '2018-4',
		    	byColour = '2018-green',
		    },
		    ['Andrevan'] = {
		    	byYear = '2018-5',
		    	byColour = '2018-blue',
		    },
		    ['Fred Bauder'] = {
		    	byYear = '2018-6',
		    	byColour = '2018-indigo',
		    },
		    ['GiantSnowman'] = {
		    	byYear = '2018-7',
		    	byColour = '2018-violet',
		    	dateOpened = '2018 December 17',
		    },
		}, -- 2018
		['2017'] = {
			['War of the Pacific'] = {
				byYear = '2017-1',
				byColour = '2017-red',
			},
			['Magioladitis'] = {
				byYear = '2017-2',
				byColour = '2017-orange',
			},
			['Magioladitis 2'] = {
				byYear = '2017-3',
				byColour = '2017-yellow',
			},
			['Arthur Rubin'] = {
				byYear = '2017-4',
				byColour = '2017-green',
			},
			['Conduct of Mister Wiki editors'] = {
				byYear = '2017-5',
				byColour = '2017-blue',
			},
		},  -- 2017
		['2016'] = {
			['Wikicology'] = {
				byYear = '2016-1',
				byColour = '2016-red',
				dateOpened = '2016 April 8',
				dateClosed = '2016 May 13',
			},
			['Gamaliel and others'] = {
				byYear = '2016-2',
				byColour = '2016-orange',
				dateOpened = '2016 April 18',
				dateClosed = '2016 June 4',
			},
			['Michael Hardy'] = {
				byYear = '2016-3',
				byColour = '2016-yellow',
				dateOpened = '2016 August 11',
				dateClosed = '2016 October 1',
			},
			['The Rambling Man'] = {
				byYear = '2016-4',
				byColour = '2016-green',
				dateOpened = '2016 September 3',
				dateClosed = '2016 October 13',
			},
		},  -- 2016
	    ['2015'] = {
	    	['Wifione'] = {
	    		byYear = '2015-1',
	    		byColour = '2015-red',
	    		dateOpened = '2015 January 2',
	    		dateClosed = '2015 February 13',
	    	},
	        ['Christianity and Sexuality'] = {
	        	byYear = '2015-2',
	        	byColour = '2015-orange',
	        	dateOpened = '2015 January 19',
	        	dateClosed = '2015 March 7',
	        },
	        ['Infoboxes'] = {
	        	byYear = '2015-3',
	        	byColour = '2015-yellow',
	        	dateOpened = '2015 January 27',
	        	dateClosed = '2015 March 4',
	        },
	        ['Collect and others'] = {
	        	byYear = '2015-4',
	        	byColour = '2015-green',
	        	dateOpened = '2015 March 23',
	        	dateClosed = '2015 May 10',
	        },
	        ['American politics 2'] = {
	        	byYear = '2015-5',
	        	byColour = '2015-blue',
	        	dateOpened = '2015 March 24',
	        	dateClosed = '2015 June 19',
	        },
	        ['Sockpuppet investigation block'] = {
	        	byYear = '2015-6',
	        	byColour = '2015-indigo',
	        	dateOpened = '2015 April 23',
	        	dateClosed = '2015 June 9',
	        },
	        ['OccultZone and others'] = {
	        	byYear = '2015-7',
	        	byColour = '2015-violet',
	        	dateOpened = '2015 April 30',
	        	dateClosed = '2015 June 3',
	        },
	        ['Lightbreather'] = {
	        	byYear = '2015-8',
	        	byColour = '2015-pink',
	        	dateOpened = '2015 May 3',
	        	dateClosed = '2015 July 17',
	        },
	        ['Technical 13'] = {
	        	byYear = '2015-9',
	        	byColour = '2015-brown',
	        	dateOpened = '2015 June 16',
	        	dateClosed = '2015 June 26',
	        },
	        ['Arbitration enforcement'] = {
	        	byYear = '2015-10',
	        	byColour = '2015-sepia',
	        	dateOpened = '2015 June 29',
	        	dateClosed = '2015 August 24',
	        },
	        ['Kww and The Rambling Man'] = {
	        	byYear = '2015-11',
	        	byColour = '2015-emerald',
	        	dateOpened = '2015 June 29',
	        	dateClosed = '2015 August 3',
	        },
	        ['Editor conduct in e-cigs articles'] = {
	        	byYear = '2015-12',
	        	byColour = '2015-teal',
	        	dateOpened = '2015 August 4',
	        	dateClosed = '2015 November 17',
	        },
	        ['Palestine-Israel articles 3'] = {
	        	byYear = '2015-13',
	        	byColour = '2015-lilac',
	        	dateOpened = '2015 August 25',
	        	dateClosed = '2015 November 22',
	        },
	        ['Genetically modified organisms'] = {
	        	byYear = '2015-14',
	        	byColour = '2015-sapphire',
	        	dateOpened = '2015 September 28',
	        	dateClosed = '2015 December 12',
	        },
	        ['Arbitration enforcement 2'] = {
	        	byYear = '2015-15',
	        	byColour = '2015-ruby',
	        	dateOpened = '2015 October 29',
	        	dateClosed = '2015 December 25',
	        },
	        ['Catflap08 and Hijiri88'] = {
	        	byYear = '2015-16',
	        	byColour = '2015-mauve',
	        	dateOpened = '2015 October 21',
	        	dateClosed = '2015 December 29',
	        },
	        ['Neelix'] = {
	        	byYear = '2015-17',
	        	byColour = '2015-tan',
	        	dateOpened = '2015 November 10',
	        	dateClosed = '2015 November 13',
	        },
	        ['Kevin Gorman'] = {
	        	byYear = '2015-18',
	        	byColour = '2015-aquamarine',
	        	dateOpened = '2015 December 11',
	        	dateClosed = '2016 January 18',
	        },
	    }, -- 2015
		['1000'] = {
			['War of the Pacific'] = {
				byYear = '1000-10',
				byColour = '1000-mauve',
			},
			['Conduct of Mister Wiki editors'] = {
				byYear = '1000-5030',
				byColour = '1000-petunia',
			},
		}, -- 1000
	}, -- caseInfoFor

	extractPrimaryKey = function(alias)
		local idPattern = '^(%d%d%d%d)'
		local year = mw.ustring.match(alias, idPattern)
		return year
	end,

	normalizeAlias = {
		byYear = function(aliasArg)
			local idPattern = '^(%d%d%d%d)-?0*([1-9]%d*)$'
			local year
			local sequenceNumber
			year, sequenceNumber = mw.ustring.match(aliasArg, idPattern)
			if (year == nil) then
				return nil
			end
			return year .. '-' .. sequenceNumber
		end,
		byColour = function(aliasArg)
			return mw.ustring.lower(aliasArg)
		end,
	},  -- normalizeAlias
}  -- config.arbCaseAliasInfo

return config