OpenSemanticLab / mediawiki-extensions-InteractiveSemanticGraph

GNU Affero General Public License v3.0
1 stars 3 forks source link

Installation guide #27

Open yoavnash opened 1 year ago

yoavnash commented 1 year ago

I apologize for the basic question, but how does one install this extension? To make it more complex - how does one install this extension when having wikibase running inside of docker? (see here).

Another point is how does one add the html line given in the README file into the wiki pages:

<div style="width: 100%;" class="InteractiveSemanticGraph">{ "root":"TestPage", "properties":["HasProperty1", "HasProperty2"], "permalink": false, "autoexpand": false, "depth": 3 }</div>

To my understanding, this is not done automatically by this extension, however it is not straightforward to do it (for me).

moamer-dev commented 1 year ago

You have to add the html line to a template or a page that you would like to show its visualization using edit button inside the page and ten save. BUT first you have to replace the root value with the page name and properties with the properties which is connected to this page.

yoavnash commented 1 year ago

You have to add the html line to a template or a page that you would like to show its visualization using edit button inside the page and ten save. BUT first you have to replace the root value with the page name and properties with the properties which is connected to this page.

Shouldn't the replacements of the values be done automatically if I add this line in a template (in case I would like to have it shown in every page)?

moamer-dev commented 1 year ago

You have to put it in a template level and for the root you can use {{PAGENAME}} but you have to add the properties manually as it cannot be detected dynamically

simontaurus commented 1 year ago

sorry for the very late response. The easiest way to install the extension is to use the docker (compose): https://github.com/OpenSemanticLab/docker-compose-osl-wiki If you have a custom setup, please note the Extension:SemanticMediawiki and Extension:MwJson is installed - SemanticMediaWiki cannot be replaced with WikiBase. To generate a graph, you can embedd the <div> directly in the page or use a template like this. However, to edit relations, Extension:OpenSemanticLab has to be installed as well to provide a machine-readable page structure which was based on wikitext-templates but is not json-based. Extension:OpenSemanticLab also provides VisualEditor integration for the Graph Template (and others). Duo to the limitations of this extension we are currently rewriting it completely decoupled from mediawiki, see https://github.com/OpenSemanticLab/interactive-semantic-graph