DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:zwidoku

ZWIdoku Plugin

Compatible with DokuWiki

  • 2022-07-31 "Igor" unknown
  • 2020-07-29 "Hogfather" yes
  • 2018-04-22 "Greebo" yes
  • 2017-02-19 "Frusterick Manners" unknown

plugin Exports DokuWiki articles to the ZWI files for the Encyclosphere network

Last updated on
2022-04-08
Provides
Render
Repository
Source

Tagged with export, network, zwi

This plugin exports DokuWiki articles to ZWI files ZWI files that can be download on local computers. It also allows to submit DokuWiki articles to Encyclosphere network supported by the Knowledge Standards Foundation (KSF). The articles can be searched for and viewed in EncycloReader.

ZWI files are zip-compressed HTML files (with actual articles in different formats, media files and JSON metadata with descriptions) used for storing complete encyclopedic articles offline. The file format is similar to HTMLZ or ePub used by e-book readers. ZWI files are “tuned” to keep encyclopedia articles.

This DokuWiki plugin is analogues to ZWIMaker plugin for Mediawiki. Read this Mediawiki description to learn more about the settings for this plugin. Unlike Medaiwki, ZWI files created from Dokuwiki installations contain wikicode using the Dokuwiki markup.

Requirements

PHP 7.X with the zip library enabled.

Installation

This plugin requires a manual installation. To install this plugin, go to the DokuWiki install directory and run:

cd lib/plugins/
git clone https://gitlab.com/ks_found/zwidoku.git

To configure this plugin, edit the file “getEncyc.php” after the line that starts as “start configuration”.

This plugin can be called in the skin templates by creating a button “ZWI export”. Below we will discuss a method to add this button to the the Argon template.

Insert these lines in the skin file “/lib/tpl/argon/main.php” on the line 270 for the Argon template:

<?php
$MyName=tpl_pagetitle(null,1);
 
if ($MyName != "start" && $MyName != "wik_submit"  ) {
  tpl_pageinfo();
  echo "<br><hr>";
  $MyURL="lib/plugins/zwidoku/getEncyc.php?id=" . $MyName;
  echo '<button onclick="location.href = \''.$MyURL.'\';" 
  id="encycDownload" class="float-center submit-button" >ZWI export</button>';
}

This will add a button “ZWI export”.

For other skins, use a similar approach that will add a link to this URL:

lib/plugins/zwidoku/getEncyc.php?id=Title

where the “Title” is the actual title of the article that needs to be generated inside the skin PHP code.

Examples/Usage

See the plugin in action using enhub.org installation. You need to request an account to be able to create an article and to submit it to the Encyclosphere network (or to download the ZWI file to the local folder).

Known Bugs and Issues

[this section might not be needed in case of external bug manager, or use RSS feed]

ToDo/Wish List

[developers roadmap]

FAQ

[discussions should ideally be deleted and turned into FAQ entries along the way]

Discussion

Could be placed on an external page (e.g. plugin:pluginname:discussion) to have a distinction between user comments and author docs

plugin/zwidoku.txt · Last modified: 2022-07-29 23:52 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki