Add this page to your book
Remove this page from your book
ZWI file format
The ZWI files contain Wikitext of the final revision of Wiki article, all historic revisions (compressed), embedded media and ready-to use XHTML/HTML files. The ZWI files are compact (zipped) and sharable via network. They can be also uploaded to this editor again for corrections. ZWI files also include full history of article, starting from its creation and the names of the users who made changes in the article. The Wikitext uses the DokuWiki syntax and can easily be converted to Markdown and other formats.
When you edit an wiki article, one can download the ZWI file using the button “DOWNLOAD ZWI FILE” (below the editor area). One can also upload this article back for further corrections.
The ZWI files have the extension “*.zwi”. You can unzip *.zwi file and study it. A typical ZWI file has the following structure:
- article.dokuwiki - Wikitext of article with last modification. It is the main source of HTML, XHTML and other possible derivations.
- article.mediawiki - Mediawiki text (in progress) for docking to Mediawiki. It is a secondary (derived from article.dokuwiki) format.
- article.html - HTML file to view in a browser (with all headers). It is a secondary (derived from article.dokuwiki) format.
- article.xhtml - XHTML content of article body (for embedding to 3rd party pages). It is a secondary (derived from article.dokuwiki) format.
- metadata.json - a json file with detailed information about the articles (editors, abstract etc.)
- plugins.json - a json file with list of plugins used. This information used for consistency check
- media.json - a json file with list of media (images). In progress.
The file metadata.json indicates wich file is primary source of all derivative formats. For Dokuwiki installation, the primary file is “article.dokuwiki”, while article.mediawiki, article.html, article.xhtml are files after internal conversion.
In addition, the ZWI file has the following directories:
- ./data/attic/namespace/ - directory with all revisions of this article (gzipped)
- ./data/media/namespace/ - directory with media (images) of this article
- ./data/meta/namespace/title.changes - a record with previous changes
- ./data/meta/namespace/title.indexed - table with indexes
- ./data/meta/namespace/title.meta - records with previous revisions and timestamps
where the “namespace” is the article namespace (“encyclosphere” for Encyclosphere) and “title” is the actual title.
The format includes a mechanism to check its integrity. Since the ZWI file contains the full history since its creation, all changes can be reverted back.
— S.Chekanov 2021/03/17 01:18