Wikidata:WikidataCon 2017/Notes/Advanced Lua tutorial
Jump to navigation
Jump to search
Title: Advanced Lua tutorial
Speaker(s)[edit]
- Name or username: Tpt
- Contact (email, Twitter, etc.): @Tpt93 thomas@pellissier-tanon.fr
- Useful links
- Slides: https://docs.google.com/presentation/d/e/2PACX-1vS6fid-mJFrUs-vInGWHD7Zb-vexPjpcQlgtfXd-Ygdg34AO0_WI_6XKxN4KaGnXvoJoVbq61CrWhBJ/pub
- Standard library documentation: https://www.mediawiki.org/wiki/Lua_reference_manual
- Test item: https://www.wikidata.org/w/index.php?title=Module:Foo&action=edit
- Lua reference manual: https://www.lua.org/pil/contents.html
- Example of object oriented code: https://test2.wikipedia.org/wiki/Module:GlobeCoordinate
- Microdata specification: https://www.w3.org/TR/microdata/
- schema.org: http://schema.org
- Some microdata libraries: http://schema.rdfs.org/tools.html
- https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua
Abstract[edit]
The goal of this tutorial is to present some advanced features of the Lua programming language and of the libraries provided by MediaWiki. Between other things, object oriented programming, JSON support, interaction with wiki and Wikibase content will be presented.
Collaborative notes of the session[edit]
Use "mw.ustring" instead of "string" when working with strings in Lua to get Unicode support (string only work in ASCII).
Utility functions (MediaWiki):
* mw.addWarning * mw.loadData
Microdata (see page 45 in slides)
...