blob: df93351142710b9fdd1fcc69dccca3a57a36b3b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
.. MediaGoblin Documentation
Written in 2013 by MediaGoblin contributors
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to
the public domain worldwide. This software is distributed without
any warranty.
You should have received a copy of the CC0 Public Domain
Dedication along with this software. If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
==========
Plugin API
==========
This documents the general plugin API.
Please note, at this point OUR PLUGIN HOOKS MAY AND WILL CHANGE.
Authors are encouraged to develop plugins and work with the
MediaGoblin community to keep them up to date, but this API will be a
moving target for a few releases.
Please check the release notes for updates!
:mod:`pluginapi` Module
-----------------------
.. automodule:: mediagoblin.tools.pluginapi
:members: get_config, register_routes, register_template_path,
register_template_hooks, get_hook_templates,
hook_handle, hook_runall, hook_transform
Configuration
-------------
Your plugin may define its own configuration defaults.
Simply add to the directory of your plugin a config_spec.ini file. An
example might look like::
[plugin_spec]
some_string = string(default="blork")
some_int = integer(default=50)
This means that when people enable your plugin in their config you'll
be able to provide defaults as well as type validation.
|