Scribunto: An Introduction

From Wikibooks, open books for an open world
Jump to: navigation, search

Scribunto: An Introduction is a book for people who want to learn how to program using Scribunto. Scribunto enables users to embed the Lua programming language into wikis that use MediaWiki, the software that powers Wikipedia. This book covers how to get started, basic programming techniques, and how to use some of the Lua libraries that are unique to Scribunto. It is aimed at beginners to programming, particularly those who have some familiarity with the MediaWiki software, but may also be useful to experienced programmers who are new to Scribunto.


  1. About

Part One: Setting Up[edit]

  1. Getting started
  2. When to convert a template

Part Two: First Steps[edit]

  1. Your first module
  2. Function names
  3. Arguments

Part Three: Lua Basics[edit]

  2. Strings
  3. Operators
  4. Variables
  5. Types
  6. Tables
  7. If statements
  8. Looping
  9. Local and global variables
  10. Functions

Part Four: Libraries[edit]

  1. Scribunto base functions
  2. Frame objects
  3. String and ustring libraries
  4. Table library/
  5. Title library
  6. Language library
  7. HTML library
  8. Site library
  9. URI library
  10. Math library
  11. Text library
  12. Message library
  13. OS library
  14. Library utils

Part Five: Tips and Tricks[edit]

  1. Template tricks in Lua
  2. Write everything once
  3. /Write for Lua and for#invoke/
  4. Working with big data sets
  5. Localisation


  1. Glossary
  2. Resources