0% developed

Scribunto: An Introduction

From Wikibooks, open books for an open world
Jump to navigation Jump to 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.

Contents[edit | edit source]

  1. About

Part One: Getting Started[edit | edit source]

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

Part Two: Lua Basics[edit | edit source]

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

Part Three: Modules[edit | edit source]

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

Part Four: Common tasks[edit | edit source]

  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 | edit source]

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

Part Six: Advanced Topics[edit | edit source]

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

Appendixes[edit | edit source]

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