Extension:Silva

Silva reads a skill list from a CSV list and draws a 2D tree from it. Each skill is represented exactly once. The order of skills is preserved, from the trunk up. The color of each tree section goes from green to red depending on the frequency of the skill.

Usage
If two persons, P1 and P2 acquired skills over time, each line between the tags should list them in chronological order. One line starts with the name of the person and the skill after a semi-colon, as follows:

P1;S1 P1;S2 P2;S2 P2;S3

will be rendered as:



Although it is not in action on the above image, when the mouse is placed over a section of the tree, the name of the corresponding skill is displayed as a tooltip. And each tree section is also a relative link to the article with the name of the skill.

Attributes

 * alt (default alt="Silva Tree") - defines the alt attribute of the img element of the 2D tree image.
 * title (default alt="Silva Tree Title") - defines the title attribute of the img element of the 2D tree image.
 * wfactor (default wfactor="1.0") a factor > 0.0 and <= 1.0 controlling the weight of a branch, imposing the condition: NO_SKILLS_IN_BRANCH <= sfactor * NO_SKILLS_IN_TREE_LEVEL; other  values than specified, leads to unexpected behaviour.
 * ffactor (default ffactor="0.8") a factor >= 0.0 and < 1.0 controlling the position of a skill in the tree, imposing the condition: SKILL_CUMULATIVE_FREQUENCY < rfactor *  SKILL_TOTAL_FREQUENCY;  other  values  than specified, leads to unexpected behaviour.
 * strings (no default) if set, the sorted list of unique occurrences of the first field of the CSV is displayed after the h3 header containing the value of the strings attribute. Example: strings="People".
 * letters (no default) if set, the sorted list of unique occurrences of the second field of the CSV is displayed after the h3 header containing the value of the letters attribute. Example: letters="Skills".

Example: 

CSS
The element is replaced with &lt;div class="silva" id="01234567890123456"> ... &lt;/div> where id is unique for a given set of attributes and content. For instance P and P will lead to a different id although the content is the same, because the alt attribute is different.

If the strings attribute is set, the list is enclosed in: &lt;div class="silva silva_strings"> ... &lt;/div>

If the letters attribute is set, the list is enclosed in: &lt;div class="silva silva_letters"> ... &lt;/div>

Debian package
In /etc/apt/sources.list add the following lines deb http://silva.dachary.org/silva ./ deb-src http://silva.dachary.org/silva ./ and then, from the command line type apt-get update apt-get install mediawiki-silva

Download instructions
Please cut and paste the code and place it in. Note: stands for the root directory of your MediaWiki installation, the same directory that holds .

Installation
To install this extension, add the following to : Note that the extension depends on the silva program to create the images. It must be installed for the extension to work.