Offline content generator/metabook.json

The metabook.json is a file part of the bundle and gathers the collection/book metadatas.

= Specification =

The  file is composed of several different object types, each of which shares a field named   which can be used to distinguish them. The top level object is a.

Collection
A collection object contains the specification for the entire render and contains the following fields:
 * type :
 * version :
 * items : an array of  or   objects.
 * license: an array of  objects.
 * title: the overall title for the collection
 * subtitle: overall subtitle for the collection
 * summary: summary text for the collection (currently unused)
 * toc: (optional) a boolean indicating whether a table of contents will be generated for this collection. If this option is missing, a table of contents will be generated iff items contains at least one   object.
 * wikis: an array of  objects, giving the wiki configurations referenced by the

Chapter
A chapter object groups articles in a collection. It contains the following fields:
 * type :
 * title : the title of this chapter
 * items : an array of  objects contained within this chapter.

Article
An article object represents a single wikipedia article within a collection or chapter. It contains the following fields:
 * type :
 * title: the title of the article, in human-readable form (spaces, initial lowercase where appropriate, etc)
 * wiki: an index within the 's   array, giving the   for the wiki containing this article
 * revision: (optional) the revision ID of the article. If missing, the latest version will be rendered.

The following fields are filled in by the bundler process, but are not required as input to the bundler.
 * revision: if the article revision is missing, it will be added
 * timestamp: the timestamp corresponding to the given revision

The following fields are present for legacy compatibility, but are presently unused:
 * currentVersion:
 * content_type:
 * latest: the most recent revision of the article. Hard coded to match the   field so that we don't spoil caching.
 * url: the canonical URL for the article. (This can be derived from the  and siteinfo in the bundle.)

License
A license object presumably represents the default license for a wiki or collection. It is currently unused.
 * type:

WikiConf
A wikiconf object gives the configuration of one of the wikis from which articles and images will be taken. It contains the following fields:
 * type :
 * baseurl: the  for the wiki, from which we can obtain the API endpoints.
 * script_extension: the  for the wiki
 * imagesize: the maximum image width (in pixels) to use when rendering images from this wiki
 * parsoid: a parsoid endpoint to use for parsing content from this wiki. Should correspond to
 * prefix: a prefix to use when formulating parsoid queries. Should correspond to   (and, in general, to   in the wiki's siteinfo).
 * filerepos: an array of  objects giving the configuration of local and foreign file repositories for this wiki.

The following fields are present for legacy compatibility, but are presently unused:
 * keep_tmpfiles:
 * format:
 * status_file
 * output

FileRepo
A filerepo object gives the configuration of a foreign or local file repository used by a wiki. The,  , and   fields correspond to those in the output of a   query on the wiki. It contains the following fields:
 * type :
 * name : a short name for the repo, typically  or  .  Corresponds to the   field in the image metadata.
 * wiki : an index into the 's   field giving the wiki configuration of this file repository.  For local repos, this will give the index of the containing.

The following fields are present but currently unused:
 * displayname: A human-readable name for this file repository
 * rootUrl
 * local : a boolean reflecting whether this file repository is within the containing
 * scriptDirUrl: the  of the repository (this can be obtained from the   referenced by the   field of the.
 * rootUrl: a path which could be used to construct a direct URL for a file in the repository

= Examples =