====== WIK  file format ======

The WIK files contain Wikitext of the final revision of Wiki article, all historic  revisions (compressed), embedded media  and ready-to use XHTML/HTML files. The WIK files  are compact (zipped) and sharable via network. They can be also uploaded to this editor again for corrections. WIK 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 WIK file using the button "DOWNLOAD WIK FILE" (below the editor area).  One can also upload this article back for further corrections.

The WIK files have the extension "*.wik".
You can unzip *.wik file and study it. A typical WIK file has the following structure:

   *  **article.txt** - Wikitext of article with last modification. It is the  __main source__ of HTML, XHTML and other possible derivations.
  *  **article.html** - HTML file to view in a browser (with all headers). It is a secondary (derived from article.txt) format.
  * ** article.xhtml** - XHTML content of article body (for embedding to 3rd party pages). It is a secondary (derived from article.txt) format.
  * ** meta.json **   - a json file with detailed information about the latest revisions (modification time, nr of revisions)
  * ./data/attic/namespace/ - directory with all revisions of this article (gzipped)
  * ./data/media/namespace/ - directory with media (images) of this article
  * ./data/meta/namespace  - directory with information about previous revisions, including   
    * ./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 WIK  file contains the full history since its creation, all changes can be reverted back.

 --- //[[schekanov@jwork.org|S.Chekanov]] 2021/03/17 01:18//