Plugin
HomeGallery can be extended via plugins. This feature is quite new and it is in an experimental state. Currently the plugin feature supports meta data extraction and database creator.
Visit Internals and the FAQ to get familiar with the basic architecture and design decisions if you plan to develop and fix as plugin. See also Development for full blown development.
In this section assumes that you setup the gallery with a gallery configuration correctly. Please visit Install section if not done yet.
To develop a plugin it is recommended to run the gallery from sources via git or at least from the tar.gz generic bundle ball. The tar.gz ball can be downloaded from dl.home-gallery.org/dist.
Extending the web application is not yet supported. This feature is planed for the future. For the time being please visit Development to extend the web application.
Plugin Quickstart
Disable built in plugins
Build in plugins can be disabled in the configuration gallery.config.yml
See ./gallery plugin ls to list available plugins to deactivate. Use
--long argument to see detailed list
After a plugin has been deactivated the database needs to be rebuilt to apply changes.
Plugin Structure
The plugin defines basic information and an entry point.
The entry file must export an object with name,
version, requires property and an initialize function.
Optionally a requires array can define dependencies to
other plugins. The dependency can contain also a semantic version like
['other@1.2.3'].
The asynchronous initialize() function is called with the
plugin manager and must return an array with different plugin modules.
The manager offers access to the gallery config and the context properties and can create logger instances.
Plugins can store properties and objects in the context, namespaeced by
plugin.<pluginName>.