Tutorial on plugins

Cheatsheet: Metadata

Single file

Structure Overview

About

The about section is purely informal. It's intended to help contact the author and have a humanly formatted version string.
The about data is visible in the online plugin-list.

author
The author of the plugin.
e-mail
The e-mail address under which the author can be contacted.
version
A humane version number of the plugin.

Help

The help section is used by the help plugin. There should be an entry with an empty string as key. That's the root entry. Keys must be one or more words separated by a single space. The keys are listed with the '+' in the help plugin.

:help:
  en:
    "": "This is the root entry."
    "key": "This will be displayed by 'butler, help thisplugin key'."
    "key1 key2": "This will be displayed by 'butler, help thisplugin key1 key2'."

Revision

Revision is required to identify plugins that can be updated, it is also necessary to avoid problems with updated plugins. If you configuration layout changes, you must define a :configuration key in revisions. If you update a plugin and the configuration revision differs, butler will when you load the plugin try to call Plugin::update_configuration(old_revision, new_revision), if that fails, it will delete the active configuration to avoid a defect.

Strings

Strings are used with the methods Plugin#answer, Plugin#say and Plugin#localize (aliased to _). Strings can contain ERB style code segments.

Summary

Summary is displayed in the plugin-repository.

Usage

Usage is used by the usage-plugin.

Valid XHTML, 2007-02-12 00:04 CET