Page MenuHomePhabricator

Lua Task 9 - MediaWiki Libraries
Closed, DeclinedPublic


Prerequisite: Lua Task 8 - Lua Tables. This task requires research and independent learning. It may not be suitable for beginners to programming.

Read the Module documentation at Module:Sandbox/RexxS/GCI09 and check the pages linked.

1 Copy the function 'langnames' from to your module sandbox. Read to work out what it does. The for loop demonstrates an example of how we could extract all of the data in a table into a string that we can return to the wiki-page.

2 Write a call in a new section of your sandbox called ==Task 9== that calls 'langnames' from your module sandbox.

I want a function called 'pageinfo' that takes a title as a parameter and returns some information about the corresponding Wikipedia page. Here are some examples of what I want it to display:
Color exists and is not a redirect
Colour exists and is a redirect
Colr does not exist and is not a redirect

3 In your module sandbox, write a function that uses from to create a title object that we can use to test whether the given title exists and whether it is a redirect. If you need a start, copy the code from and improve on that.

4 In your sandbox write 6 test cases to show your module works. Link it from here.

Event Timeline

RexxS created this task.Dec 15 2017, 4:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 15 2017, 4:28 PM
RexxS updated the task description. (Show Details)Dec 15 2017, 4:28 PM

I will mentor this in Google-Code-in 2017.

Aklapper closed this task as Declined.Jan 17 2018, 6:28 PM

Closing this task as it was a placeholder in Phab for Google-Code-in-2017 which is ending these days (no more new tasks can be claimed from now on in GCI 2017).