Extension:Genealogy

This page is a translated version of the page Extension:Genealogy and the translation is 100% complete.
Manuel des extensions MediaWiki
Genealogy
État de la version : stable
Implémentation Fonction d'analyseur
Description Ajoute une fonction d'analyseur pour faciliter les liens entre les articles généalogiques.
Auteur(s) Sam Wilson (samwilsondiscussion)
Dernière version 2.4.0 (2023-03-09)
Politique de compatibilité Le master conserve la compatibilité arrière.
MediaWiki >= 1.39
Modifie la base
de données
Non
Composer samwilson/mediawiki-extensions-genealogy
Licence Licence publique générale GNU v3.0 ou supérieur
Téléchargement
README.md
Exemple Demo wiki on Toolforge
Téléchargements trimestriels 8 (Ranked 123rd)
Traduire l’extension Genealogy sur translatewiki.net si elle y est disponible
Problèmes Tâches ouvertes · Signaler un bogue

The Genealogy extension adds a parser function that makes it easy to link between genealogical articles. Basically, for any biographical article which links to other family members, the reverse link on those other articles can be created automatically.

You can experiment with it on Toolforge.

Installation

Note that you also need to install the Mermaid or Diagrams extension if you want to use the tree-drawing feature.

Installer avec Composer

The easiest way to install this extension is with Composer. Add this to your composer.local.json file:

{
  "require": {
    "samwilson/mediawiki-extensions-genealogy": "^2.0"
  }
}

Puis exécutez composer update.

Après cela, vous pouvez activer l'extension en ajoutant ce qui suit à votre fichier LocalSettings.php  :

wfLoadExtension( 'Genealogy' );

Méthode d'installation normale

  • Téléchargez et placez le(s) fichier(s) dans un répertoire appelé Genealogy dans votre dossier extensions/.
    Les développeurs et les contributeurs au code doivent à la place installer l'extension à partir de Git en utilisant:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Genealogy
  • Ajoutez le code suivant à la fin de votre fichier LocalSettings.php  :
    wfLoadExtension( 'Genealogy' );
    
  •   Fait – Accédez à Special:Version sur votre wiki pour vérifier que l'extension a bien été installée.

Utilisation

This extension creates one parser function: {{#genealogy: … }}. Its first first parameter is unnamed (i.e. doesn't have an equals sign) but all others are.

The following parameters are supported, three for defining data () and four for reporting data ():

  1. Define and output a link to a parent:
    {{#genealogy:parent|Page Name Here}}
  2. Define a partner (no output produced; use partners to list):
    {{#genealogy:partner|Page Name Here}}
  3. Define a page's description (see below for what that means):
    {{#genealogy:description|Some description}}
    A page's description is a date range or short phrase that will appear in places next to page titles to give them some more context. For example, under people's names in the tree output.
  4. List all siblings:
    {{#genealogy:siblings|exclude_self=yes}}
    Where exclude_self optionally excludes the current page from the resulting list.
  5. List all partners:
    {{#genealogy:partners}}
  6. List all children:
    {{#genealogy:children}}
  7. Display a tree (a connected graph):
    {{#genealogy:tree|ancestors=List|descendants=List|delimiter=char|format=formatname}}
    where each List is a delimiter-separated list of page titles, and formatname is 'graphviz' or 'mermaid' (not case sensitive). This requires the Mermaid , GraphViz , or Diagrams extension. The delimiter is a newline by default (i.e. each page title should appear on it's own line).

Modèles

Example: For an example template that makes use of these parser functions, see person_template.wikitext.

Preload: When this extension creates a link to a page that doesn't yet exist, the text of [[Template:Person/preload]] is preloaded. The location of this preload text can be customised by modifying the genealogy-person-preload system message.

Person list-item: Three types of lists of people can be generated: siblings, partners, and children. The default behaviour is a simple bulleted list, but this can be overridden by a template, Template:Person/list-item (the template name is specified by the genealogy-person-list-item system message). For example, to get a comma-separated one-line list of people, the following template code could be used:

{{{link}}}{{#if: {{{description|}}} | ({{{description}}}) }}{{#ifeq:{{{index}}}|{{{count}}}|.|,}}

There are six parameters that are available for use in the list-item template:

  • link — A wikitext link.
  • title — The full page title, including namespace.
  • pagename — The page name, without namespace.
  • description — The page description.
  • index — The index of this list-item in the full list, starting from 1.
  • count — The total number of items in the full list.

Développement

This extension was built by Sam Wilson and released under version 3 of the GPL (see LICENSE.txt for details).

Please report all bugs to the #Genealogy project on Phabricator.

Voir aussi