Module:Sandbox/Lotje
Appearance
From Wikipedia, the free encyclopedia
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
-- -- Lua functions for Lotje's personal use -- p = {} -- randimg returns a random item from a list of image filenames -- use it like this: -- {{#invoke:Lotje|randimg}} -- -- The list of images uses standard wiki-syntax -- but it has to enclosed in straight double-quote marks " ... " -- unless there are double-quote marks in the filename -- then you enclose it in single quote marks ' ... ' -- if the filename contains both single- and double-quotes -- then pick another file (or rename it) -- because it's a list, you put a comma (,) after each item except the last one -- if you add more files, don't forget to put the comma in as well p.randimg = function(frame) math.randomseed (os.time()) local images = { "[[File:Junge Frau mit Taubenpost.jpg|300px]]", "[[File:1903. Письмо из америки.jpg]]", "[[File:Alfred Stevens - The Letter.jpg|300px]]", "[[File:Augustus Leopold Egg The love letter.jpg|300px]]", "[[File:Belmiro de Almeida - A má notícia.jpg|300px]]", "[[File:F Lucca Ein interessanter Brief.jpg|300px]]", "[[File:George Goodwin Kilburne Writing a letter home 1875.jpg|300px]]", "[[File:Gustave Léonard de Jonghe Der Liebesbrief 1867.jpg|300px]]", "[[File:James Tissot - The Letter.JPG|300px]]", "[[File:Knut Ekwall-Flickan med brevet.jpg|300px]]", "[[File:Raja Ravi Varma, Disappointing News.jpg|300px]]", "[[File:De liefdesbrief Rijksmuseum SK-A-1595.jpeg|300px]]", "[[File:Brieflezende vrouw Rijksmuseum SK-C-251.jpeg|300px]]", "[[File:Miss Mary Edwards - Hogarth 1742.jpg|300px]]", "[[File:'Correspondence' by Theodore Robinson, 1895.jpg|300px]]", "[[File:Abraham Solomon.jpg|300px]]", "[[File:Lionel Baes Young woman with letter box.jpg|300px]]", "[[File:John Callcott Horsley - The Morning of St Valentine - Google Art Project.jpg|300px]]", "[[File:Vermeer, Johannes - Woman reading a letter - ca. 1662-1663.jpg|300px]]", "[[File:Willem Bartel van der Kooi - De minnebrief.jpg|300px]]", "[[File:Władysław Czachórski - List (1896).jpg|300px]]", "[[File:Woman Reading a Letter by Gabriël Metsu.jpg|300px]]", "[[File:Toulouche Love Letter.jpg|300px]]", "[[File:Federico Andreotti - The Love Letter.jpg|300px]]", "[[File:Jef Leempoels - A morning missive.jpg|300px]]", "[[File:Almeida Júnior - Saudade (Longing) - Google Art Project.jpg|300px]]", "[[File:Metsu, Briefleester.jpg|300px]]", "[[File:A folded paper letter with remnants of ties (Venice, 1540). (8065271382).jpg|300px]]", "[[File:Bertha Worms - Notícia triste, 1921.jpg|300px]]", "[[File:'Correspondence' by Theodore Robinson, 1895.jpg|300px]]", "[[File:Adrien de Witte - La Lettre.jpg|300px]]", "[[File:Gabriel Schachinger Das Vergissmeinnicht.jpg|300px]]", "[[File:Vittorio Reggianini - The Letter.jpg|300px]]", "[[File:Franz Wenzel Schwarz Die gute Nachricht 1870.jpg|300px]]", "[[File:Jan Vermeer - Girl Reading a Letter at an Open Window.JPG|300px]]", "[[File:Rembrandt Harmensz. van Rijn 016.jpg|300px]]", "[[File:1880 Woltze Ein Brief aus Amerika anagoria.JPG|300px]]", "[[File:Character sketches of romance, fiction and the drama (1892) (14598383080).jpg|300px]]", "[[File:Loves Messenger Stillman DAM.jpg|300px]]", "[[File:Marguerite Gerard - Gift.jpg|300px]]", "[[File:Mary Brewster Hazelton, The Letter, by 1916 when she won the Newport Art prize.jpg|300px]]", "[[File:Federico Andreotti - The Love Letter.jpg|300px]]", "[[File:Edgard Farasijn Sad News.jpg|300px]]", "[[File:An avatar in the virtual world Second Life.png|300px]]", "[[File:Sending a Letter.jpg|300px]]", "[[File:August Müller Tagebucheintrag.jpg||300px]]", '[[File:"The messenger of love" by Leonard Straszyński.jpg|300px]]' } -- you don't need a comma after the last item ^^^^^ local numberofimages = #images local index = math.random(numberofimages) return images[index] end return p