Difference between revisions of "plugins"
m (mauvais lien interne) |
(Remove plugin names not present anymore in version 7.1 source code.) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
GeneWeb offers a '''plugin mechanism''' since its version 7.1 that allows functional extensions without impacting the core operation of the system. | GeneWeb offers a '''plugin mechanism''' since its version 7.1 that allows functional extensions without impacting the core operation of the system. | ||
− | Plugins are loaded by [[gwd|{{c|gwd}}]] at launch time through the parameter {{c|- | + | Plugins are loaded by [[gwd|{{c|gwd}}]] at launch time through the parameter {{c|-plugin one_plugin}} (or {{c|-plugins plugins_folder}}) pointing to the location of one plugin er a folder where several plugins are kept. |
<!-- can there be several plugins locations?? to be verified --> | <!-- can there be several plugins locations?? to be verified --> | ||
+ | This launch parameter can be augmented with the option {{c|-unsafe}}, allowing loading of unverified plugins, and {{c|-force}}, forcing the load of this (or these) plugin for all bases. | ||
− | In addition, the [[configuration|{{c|.gwf}} parameters file]] must specify | + | In addition, the [[configuration|{{c|.gwf}} parameters file]] must specify the list of plugins to activate for this base: |
plugins=plugin1,plugin2,plugin3 | plugins=plugin1,plugin2,plugin3 | ||
== Geneweb plugins == | == Geneweb plugins == | ||
− | + | This list is limited to those currently implemented in version 7.1 | |
− | + | Refer to pending [https://github.com/geneweb/geneweb/issues/1576 issue #1576 on Github] | |
− | === | + | === cgl === |
The {{c|cgl}} plugin is an example of plugin whose function is limited to a post processing of the data produced by GeneWeb, removing in this data stream all occurrences of {{c|href}}. | The {{c|cgl}} plugin is an example of plugin whose function is limited to a post processing of the data produced by GeneWeb, removing in this data stream all occurrences of {{c|href}}. | ||
This plugin supersedes the {{c|1=cgl=on}} command one can add to the URL to ask for suppression of href links. | This plugin supersedes the {{c|1=cgl=on}} command one can add to the URL to ask for suppression of href links. | ||
− | === | + | === export === |
Exports to {{c|.GED}} or {{c|.gw}} format the content of a base. | Exports to {{c|.GED}} or {{c|.gw}} format the content of a base. | ||
Invoqued through a {{c|1=m=EXPORT}} command with the following parameters: | Invoqued through a {{c|1=m=EXPORT}} command with the following parameters: | ||
Line 33: | Line 34: | ||
{…} | {…} | ||
− | === | + | === fixbase === |
+ | {…} | ||
+ | |||
+ | === forum === | ||
Isolate in a plugin the forum functions. | Isolate in a plugin the forum functions. | ||
− | === | + | === gwxjg === |
+ | {…} | ||
+ | |||
+ | === jingoo === | ||
+ | {…} | ||
+ | |||
+ | === lib_show === | ||
+ | {…} | ||
+ | |||
+ | === no_index === | ||
Implements the {{c|1=opt=no_index}} parameter in the URL. Replaces non stable instances of {{c|1=i=index}} by their stable values {{c|1=p=first_name;n=surname;oc=occ}}. | Implements the {{c|1=opt=no_index}} parameter in the URL. Replaces non stable instances of {{c|1=i=index}} by their stable values {{c|1=p=first_name;n=surname;oc=occ}}. | ||
− | === | + | <!-- |
+ | === v7 === | ||
The v7 plugin regroups in a single place the traditional V7 behavior of GeneWeb (over time a V8 plugin may offer a new set of templates). | The v7 plugin regroups in a single place the traditional V7 behavior of GeneWeb (over time a V8 plugin may offer a new set of templates). | ||
− | All GUI related informations that were located in the {{c|hd}} repository folder are | + | All GUI related informations that were located in the {{c|hd}} repository folder are (or will soon be) located in {{c|plugins/v7/assets}}. |
Several {{c|.ml}} files (cousins, date, descend, interp, perso, place, some, sosa, srcfile, templ) implement slight (or significant) variations from the core GeneWeb behavior. | Several {{c|.ml}} files (cousins, date, descend, interp, perso, place, some, sosa, srcfile, templ) implement slight (or significant) variations from the core GeneWeb behavior. | ||
Line 52: | Line 66: | ||
*{{c|1=m=P}} prints the list of persons with a given first_name, with additional options. | *{{c|1=m=P}} prints the list of persons with a given first_name, with additional options. | ||
*{{c|1=m=PS}} prints the list of surnames associated with a place for a given set of events (birth, baptism, marriage, death, burial). | *{{c|1=m=PS}} prints the list of surnames associated with a place for a given set of events (birth, baptism, marriage, death, burial). | ||
+ | *{{c|1=m=TP;v=file}} interprets template file tp_file.txt (or tp0_file.txt if no person is associated with the request). | ||
+ | --> | ||
− | === | + | === xhtml === |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{…} | {…} | ||
Latest revision as of 05:37, 28 March 2024
Language: | English • français |
---|
GeneWeb offers a plugin mechanism since its version 7.1 that allows functional extensions without impacting the core operation of the system.
Plugins are loaded by gwd
at launch time through the parameter -plugin one_plugin
(or -plugins plugins_folder
) pointing to the location of one plugin er a folder where several plugins are kept.
This launch parameter can be augmented with the option -unsafe
, allowing loading of unverified plugins, and -force
, forcing the load of this (or these) plugin for all bases.
In addition, the .gwf
parameters file must specify the list of plugins to activate for this base:
plugins=plugin1,plugin2,plugin3
Geneweb plugins
This list is limited to those currently implemented in version 7.1 Refer to pending issue #1576 on Github
cgl
The cgl
plugin is an example of plugin whose function is limited to a post processing of the data produced by GeneWeb, removing in this data stream all occurrences of href
.
This plugin supersedes the cgl=on
command one can add to the URL to ask for suppression of href links.
export
Exports to .GED
or .gw
format the content of a base.
Invoqued through a m=EXPORT
command with the following parameters:
output=GED/GW
select export formatspouses=on/off
parents=on/off
children=on/off
notes=/nn/nnn
sources=on/off
isolated=on/off
pictures=on/off
isolated=on/off
{…}
fixbase
{…}
forum
Isolate in a plugin the forum functions.
gwxjg
{…}
jingoo
{…}
lib_show
{…}
no_index
Implements the opt=no_index
parameter in the URL. Replaces non stable instances of i=index
by their stable values p=first_name;n=surname;oc=occ
.
xhtml
{…}
Development of plugins
Developers should explore existing plugins to infer the overall mechanism, but it should be noted that such development requires a good understanding of both the OCaml language and GeneWeb itself.
Developers will find plugins in the plugins
folder of the GitHub repository.
In the plugins folder, each plugin is in a subfolder named pl_name_plugin
.
The command make distrib
will compile those plugins and install then in a distribution/plugin
folder.
Associated ressources with each plugins, such as templates, images, lexicon entries, are located in an assets
subfolder.