Scribunto: An Introduction

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.

Contents

edit
  1. About

Part One: Getting Started

edit
  1. Background
  2. When to convert a template
  3. Setting up
  4. Your first module

Part Two: Lua Basics

edit
  1. Numbers
  2. Strings
  3. Variables
  4. Tables
  5. Functions

Part Three: Modules

edit
  1. Using invoke
  2. Arguments
  3. Comments
  4. Types
  5. Branching
  6. Looping
  7. Scope

Part Four: Common tasks

edit
  1. The parent frame
  2. Creating long strings
  3. String manipulation
  4. Generating HTML
  5. Table manipulation
  6. Using other modules
  7. Working with big data sets
  8. Getting mathematical
  9. Formatting dates

Part Five: Writing Good Code

edit
  1. Don't repeat yourself
  2. Write for Lua and for invoke

Part Six: Advanced Topics

edit
  1. Test cases
  2. Localisation
  3. Importing modules from other wikis
  4. Object-oriented programming
  5. Writing libraries

Appendixes

edit
  1. Glossary
  2. Resources
  3. Calculating SHA-2 in Scribunto: Module:SHA2