Jump to content

Module:Outline of the week

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by The Transhumanist (talk | contribs) at 22:51, 2 October 2023 (create module). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Define a list of Wikipedia outline page names
local pages = {
    "[[Outline of physics]]",
    "[[Outline of robotics]]",
    "[[Outline of computer science]]",
    "[[Outline of biology]]",
    "[[Outline of history]]",
    "[[Outline of literature]]",
    "[[Outline of music]]",
    "[[Outline of philosophy]]",
    "[[Outline of psychology]]",
    "[[Outline of sociology]]"
}

-- Get the current week number
local week = os.date("%U")

-- Use the week number to select a page from the list
local page = pages[tonumber(week) % #pages + 1]

-- Display the selected page
print(page)