Module:ImageDuJour
Apparence
La documentation pour ce module peut être créée à Module:ImageDuJour/doc
local p = {}
-- Liste manuelle de fichiers via une catégorie
local fichiers = {
"Fichier:GuerreDesTénèbres.jpg",
"Fichier:ChuteDeLempire.png",
-- ajoute d'autres fichiers ici si tu veux un fallback
}
-- Fonction utilitaire : sélection aléatoire dans une table
local function aleatoire(tab)
math.randomseed(os.time())
return tab[math.random(#tab)]
end
-- Fonction principale
function p.depuisCategorie(frame)
-- Tu peux remplacer cette liste manuelle par une API plus avancée plus tard
return aleatoire(fichiers)
end
return p