Module:EpisodeList

local list_article = { ['Digimon Adventure'] = "List of Digimon Adventure episodes", ['Digimon Adventure 02'] = "List of Digimon Adventure 02 episodes" }

local episodelist = { ['Digimon Adventure'] = "01 · 02 · 03 · 04 · 05 · 06 · 07 · 08 · 09 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 · 19 · 20 · 21 · 22 · 23 · 24 · 25 · 26 · 27 · 28 · 29 · 30 · 31 · 32 · 33 · 34 · 35 · 36 · 37 · 38 · 39 · 40 · 41 · 42 · 43 · 44 · 45 · 46 · 47 · 48 · 49 · 50 · 51 · 52 · 53 · 54", }

local next_series = { ['Digimon Adventure'] = {"Enter Flamedramon", "Digimon Adventure 02"}, }

episode_table = { ['episodelist'] = episodelist, ['list_article'] = list_article, ['next_series'] = next_series, }

-- Libraries of functions --

-- stands for High Frequency local HF = mw.InfoboxBuilderHF -- Parses invocation parameters, trims whitespace, and removes blanks. local getArgs = require('Dev:Arguments').getArgs -- Outputs various kinds of lists. local L = require('Dev:List') -- Gives the name of the current page. It's expensive, so we only do it once. -- The _G then makes it global, available to all page functions. _G.vars = { Pagename = mw.title.getCurrentTitle.text } -- -- Public functions (called from a Template or article) -- -- -- There is no standalone template, so no public functions.

-- Internal functions (used in this and other Modules --

function episodelist:validseason( name ) if type( self[ name ] ) == 'string' then return true else return nil end end

function episodelist:makeList( name ) if self:validseason ( name ) then local episodes = mw.text.split( self[name], ' · ' ) return L.makeList( 'horizontal', episodes ) else return nil end end

- -- Output (send it back to whatever called it) -- - return episode_table