~~~~~~~~~~~~~~~
mwlib ZIP files
~~~~~~~~~~~~~~~

A ZIP file created with the ``mw-zip`` command (see ``docs/commands.txt``)
contains all information needed to render a collection of articles into some
output format like PDF.

The ZIP files contains the following files and directories:

metabook.json

    A Metabook dictionary, serialized in `JSON`_ format.
    See ``docs/metabook.txt``.

content.json

    A dictionary, serialized in `JSON`_, format with the following items:
    
    articles (dictionary):

        A dictionary with article titles as keys and dictionaries with the
        following items as values:
        
            revision (string):

                Article revision, i.e. oldid
            
            content-type (string):

                Fixed string "text/x-wiki"
            
            content (string):

                Wikitext of article
            
            url (string):

                URL of article
            
            authors (list of strings):

                List of principal article authors
    
    templates (dictionary):

        A dictionary with template titles without the prefix (i.e. without
        "Template:") as keys and dictionaries with the  following items as
        values:
        
            content-type (string):
            
                Fixed string "text/x-wiki"
            
            content (string):
            
                Wikitext of tempalte
    
    sources (dictionary):
    
        A dictionary with URLs of MediaWikis as keys and meta infomation about
        the wiki as values. See source objects in metabook.txt.
    
    images (dictionary):
    
       A dictionary with image titles without the prefix (i.e. without
       "Image:") as keys and dictionaries with the following items as values:
       
           url (string):
        
               URL of the image
              
           descriptionurl (string, optional):
        
               URL to the image page
           
           templates (list of strings, optional):
           
               List of template names references on the image description page
           
           contributors (list of strings, optional):
           
               List of contributors on the image description page


images/
    A directory containing images referenced by articles. The images are
    already converted and scaled according to the ``--imagesize`` option
    of ``mw-zip``. The filenames are the image names, with "'" replaced by "-"
    and encoded as UTF-8.


.. _`JSON`: http://json.org/